solr-query-syntax

solr query in broadleaf

为君一笑 提交于 2020-01-02 23:00:17
问题 I am new to Solr and Broadleaf. I am working in Broadleaf, in that they using the solr search. that's perfectly fine and working condition. Product table has category field and broadleaf searches by category right now As per requirement i extend the Product table and make new table with company id, so in my ExtendedProduct table there are two fields companyId and productId(fk with product table) Now i want to get product list by companyId also. our schema.xml file looks below <?xml version="1

How to exclude fields in a SOLR query

99封情书 提交于 2020-01-01 08:55:07
问题 I have a SOLR query which should fetch all the fields I store, except one field. Say I have 20 fields, do I need to hard code the 19 fields I want to fetch in the &fl=[f],[f],[f],....[f]' Or is there a way to do something similar to &fl=*,![f]' [f] stands for a field name. 回答1: Unfortunately the ability to remove a field name via the query string is still an outstanding improvement request. Please see SOLR-3191 for more details. Until this improvement is implemented, you will need to specify

Some word is not indexed in solr properly

余生长醉 提交于 2019-12-25 08:28:21
问题 I don't know what is going wrong. http://IP_ADDRESS/solr/CORE_NAME/select?indent=on&q=Bangalore&wt=json There are more than 100 records which contains the word Bangalore in my database. However the the results contain just 2 records. However, The below Query below for works perfectly. http://IP_ADDRESS/solr/CORE_NAME/select?indent=on&q=Bangalor&wt=json Just removing the letter e from Bangalore , i get much more results containing the word "Bangalore". I think the word "Bangalore" is not

solr query: x out of n words matched

狂风中的少年 提交于 2019-12-24 11:18:03
问题 supposedly I have 4 words (let's call them a,b,c and d for sake of example) and I want to search in solr to match 3 of these. I could write a query with all the permutations as follows: (a AND b AND c)OR(a AND b AND d)OR(b AND c and d) This will work and matches documents with 3 of these 4 words. but things get messy when I have 10 words and need to match 3 of them. The number of permutations required grows exponentially. obviously thanks to the complexity of the query solr goes busted(it

A public Github repo not found via search

只愿长相守 提交于 2019-12-23 03:53:14
问题 using the following search query... https://github.com/search?q=repo%3AOpeningDesign%2FOpeningDesign+GET&p=1&ref=searchbar&type=Code&l= ..on this public repo: https://github.com/OpeningDesign/OpeningDesign nothing shows up. Am i missing something? 回答1: Update January 24th, 2013: source "A Whole New Code Search" The same query repo:OpeningDesign/OpeningDesign GET now returns result! The search index must have been updated when then new search engine has been deployed (elasticsearch.org)

How can I Ignore some fields in a SOLR query

大兔子大兔子 提交于 2019-12-22 13:06:08
问题 I have Solr 5.3.1 and need to do query for all field except some field (what I need search in some field not retrieve fields this way to retrieve [/?q=query&fl=field1,field2,field3] ) i try with some solution but not work 1.How to exclude fields in a SOLR query [this soluation not work] 2.[the below solution work but take more time] query = field1:"+txtSearch+"OR field1:"+ txtSearch+" OR field1:"+txtSearch 3.I set indexed="false" in data-config.xml it only Ignore search in this field but when

How can I Ignore some fields in a SOLR query

你说的曾经没有我的故事 提交于 2019-12-22 13:05:23
问题 I have Solr 5.3.1 and need to do query for all field except some field (what I need search in some field not retrieve fields this way to retrieve [/?q=query&fl=field1,field2,field3] ) i try with some solution but not work 1.How to exclude fields in a SOLR query [this soluation not work] 2.[the below solution work but take more time] query = field1:"+txtSearch+"OR field1:"+ txtSearch+" OR field1:"+txtSearch 3.I set indexed="false" in data-config.xml it only Ignore search in this field but when

How to enforce an exact match to get the highest priority?

筅森魡賤 提交于 2019-12-13 00:01:25
问题 I am indexing and searching 5 fields, which are tokenized/filtered in various ways. BUT, I would like that when I search, if the query I entered matches a value in field 1, it will be the top result I get back. How would I define: The field The query in such a way this field gets priority IF there is 100% match In my schema, I have the field <field name="na_title" type="text_names" indexed="true" stored="false" required="true" /> text_names is : <fieldType name="text_names" class="solr

Solr query not working properly

女生的网名这么多〃 提交于 2019-12-12 03:58:05
问题 I don't know what is going wrong. This is actually a very simple query which is not working in my Solr Search. http://IP_ADDRESS/solr/CORE_NAME/select?indent=on&q=Bangalore&wt=json There are more than 100 records which contains the word Bangalore in my database. However the the results contain just 2 records. Is there anything that needs to be corrected in the schema or configuration. Can i get some quick help in this? Thanks. EDIT 1: My Filter Query below for works perfectly. http://IP

How to get results in sorted order when I use facet limit in solr?

喜夏-厌秋 提交于 2019-12-11 11:42:11
问题 Usually a solr query with facetting option returns the results in sorted order based on the facet count. When I set the facet limit to -1 the results were not returned in sorted order; this means I have to do the sorting manually in the server side. Should I need to append anything more in the solr query to get it in a sorted order? 回答1: please try facet.sort=count The default facet order is base on the count, descending order, but it will return the index order rather than count desc order