solr-query-syntax

Solr query syntax for array field

允我心安 提交于 2021-02-18 20:45:55
问题 How do I search within an array field? I am using solr 4.2 with default settings. I indexed a few html and pdf documents using SolrNet. Here is a sample result for such a document when I search using the admin search *:* enter code here <doc> <str name="id">2</str> <date name="last_modified">2011-12-19T17:33:25Z</date> <str name="author">name</str> <str name="author_s">name</str> <arr name="title"> <str>CALIFORNIA CODES</str> </arr> <arr name="content_type"> <str>application/pdf</str> </arr>

How to find exact keywords in solr search?

若如初见. 提交于 2021-01-04 08:49:58
问题 Actually I am facing one problem in solr search. There is an author field in which I stored two value like "deep kumar-singh" and "deep kumar singh". When I search the author:"deep kumar-singh" It returns both results. But I want only one result to be the exact one. Here is my field description: <field name="author" type="text_general" indexed="true" stored="true" multiValued="true"/> I created authorFacet Field to get author facet. <field name="authorFacet" type="string_ci" indexed="true"

Is there a SolrJ query builder?

◇◆丶佛笑我妖孽 提交于 2020-04-10 02:53:41
问题 Using solr 5.2.0 was wondering is there a query builder API/Jar/Ckient similar to Elasticsearch query builder API or do we have to bassically do String Kungfu to build queries in Solr? 回答1: Unfortunately, in SolrJ there is no such thing as a Builder for the query that goes into the q -Parameter. BUT: As Solr already operates on Lucene, we can as well use the Lucene QueryBuilder. The resulting Query objects (e.g. PhraseQuery) have a toString() method that provides you with the query string you

SOLR exact match results not matching

安稳与你 提交于 2020-02-05 04:26:06
问题 Hi I have a text_exact fieldType (field is text_ex ) that has KeywordTokenizerFactory for matching against exact queries. For example, searching for sale gives results that contain the term sale , specifically. When I run the query like this text_ex:sale , the number of results were found to be 28, where as when I run the same query using a switch-query parser (defined in request handler), I get the number of results as 18, even though the parsed query is same as text_ex:sale in the switch

relevance search in Solr

我的未来我决定 提交于 2020-02-02 14:37:24
问题 I am using DSE5.0.2 version and Solr ( integrated with dse) . I have to do relevance search using solr on the below tables/ data . I have a table in cassandra on which we have created a solr core - CREATE TABLE fullsearch ( launchedtime bigint, hashtag text, solr_query text, PRIMARY KEY (launchedtime)) Now we have created a solr core and searching on the field hashtag . but i want those result which contains max no of hashtag i am searching . for ex : - if data in cassandra is - launchedtime

relevance search in Solr

你离开我真会死。 提交于 2020-02-02 14:35:08
问题 I am using DSE5.0.2 version and Solr ( integrated with dse) . I have to do relevance search using solr on the below tables/ data . I have a table in cassandra on which we have created a solr core - CREATE TABLE fullsearch ( launchedtime bigint, hashtag text, solr_query text, PRIMARY KEY (launchedtime)) Now we have created a solr core and searching on the field hashtag . but i want those result which contains max no of hashtag i am searching . for ex : - if data in cassandra is - launchedtime

How to OR two joins in Solr

我的梦境 提交于 2020-01-14 03:12:35
问题 I have the following statement: ({!join from=project_uuid to=id}type:EM_PM_Timerecord AND created:[2015-01-01T01:00:00Z TO 2016-01-01T01:00:00Z]) OR ({!join from=project_uuid to=id}type:EM_CM_Request_Member AND created:[2015-01-01T01:00:00Z TO 2016-01-01T01:00:00Z]) It doesn't return any documents, but if I use only one of the joins e.g.: {!join from=project_uuid to=id}type:EM_PM_Timerecord AND created:[2015-01-01T01:00:00Z TO 2016-01-01T01:00:00Z] It returns some documents. If I remove the

Cqlsh query for wildcard characters

那年仲夏 提交于 2020-01-07 02:57:05
问题 I want a query to perform following operation List employees name either start or end with A but i seen on some sites that cassandra do not support wildcard characters is it true or not i also refered solr_query but cqlsh gives error undefined name solr_query select * from emp where solr_query='name:A* or name:*A'; where name is coloumn please help me out with this 回答1: Full Text Search is only a feature of DataStax Enterprise. So for Apache Cassandra, you have no such facility. Hope it helps

JSON returned by Solr

笑着哭i 提交于 2020-01-07 02:36:10
问题 I'm using Solr in order to index my data. Through the Solr's UI I added, in the Schema window, two fields: word, messageid After I made the following query post: curl -X POST -H "Content-Type: application/json" 'http://localhost:8983/solr/messenger/update.json/docs' --data-binary '{"word":"hello","messageid":"23523}' I received the following JSON: { "responseHeader": { "status": 0, "QTime": 55 } } When I'm going to the Query Window in the API and Execute a query without parameters I get the

Solr result grouping error .Unexpected docvalues type SORTED_SET for field 'vendor' (expected=SORTED)

只谈情不闲聊 提交于 2020-01-05 03:08:23
问题 I have a solr schema like this <fields> <field name="id" type="string" indexed="false" stored="true" required="true" /> <field name="product" type="string" indexed="true" stored="true" required="true" /> <field name="vendor" type="string" indexed="true" stored="true" required="true" /> <field name="language" type="string" indexed="true" stored="true" required="true" /> <field name="TotalInvoices" type="float" indexed="true" stored="true" required="true"/> </fields> I am querying the schema