Questions tagged [solr-query-syntax]
175 questions
1
vote
1 answer
Understanding Sort on query in solr
I am new to solr and trying to understand a solr sort criteria that goes like this -
bQ01=2859969
bQ02={!term f=prdId v=$bQ01}
bQ03={!lucene} {!v=$bQ02}^=6
buryClearanceQuery={!parent which=$pq score=min v=$matchAllQueryRef2}
matchAllQueryRef2=…

Vibhav Singh Rohilla
- 760
- 1
- 5
- 17
1
vote
1 answer
if condition in Solr Query
Can anyone of you please suggest some solution for the following questions?
What is the correct format of if query in solr.
I want to check if a particular fieldvalue is greater than a constant
For ex:
if((field1>0), field1, field2)
is this…

User1203
- 77
- 2
- 11
1
vote
1 answer
How to ignore the case sensitivity in solr query
I have a database that consist of Names and locations. I am searching for names using case insensitivity USING SOLR. However I am not able to find any way I can do that.
For example:
I have a list of Names:
Rajeev
rajeev
raj
Raj
when i search for…

Rajeev Rajvaidya
- 11
- 1
- 2
1
vote
1 answer
Solr and Rails: [* TO *] value instead of nil (asterisk TO asterisk)
Inside my model at searchable block I have index time added_at.
At search block for searching I added with(:added_at, nil), made reindex and now inside search object I have:
["-added_at_d:[* TO *]"]...}>
What is the meaning…

TiSer
- 775
- 3
- 11
- 30
1
vote
0 answers
SOLR Union of two queries
I need union similar like sql below.
Select top 10 * from table1 order by name desc
union
Select top 5 * from table1 order by name asc
So the result should be a single list with 15 records.
Is it possible to do this in single query in SOLR ?
I am…

Arif uzzaman
- 71
- 6
1
vote
1 answer
Solr wilcard searches
I would like to search a book by its title. Lets say I have 2 books called
"Please do a wildcard search"
"Please do a deep search"
and then I do a solr wildcard search like the following:
{
"responseHeader":{
"status":0,
"QTime":1,
…

jj-aa
- 1,019
- 5
- 19
- 39
1
vote
2 answers
Stored fields in Solr are getting displayed in queries , why?
I am new to using Solr , and I have made a new core and copied the default schema.xml to the conf/ folder. The changes I have made is very trivial .
…

CyprUS
- 4,159
- 9
- 48
- 93
1
vote
0 answers
Multiple ranges in solr for a regular query
How can you have a multiple ranges in a solr query when a normal query (q) is used instead of filter query (fq). I looked at answers in here Multiple ranges in a facet in solr, but they seem not to work when a normal query is used like this:…

Ville Miekk-oja
- 18,749
- 32
- 70
- 106
1
vote
1 answer
solr query: x out of n words matched
supposedly I have 4 words (let's call them a,b,candd 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…

nafas
- 5,283
- 3
- 29
- 57
1
vote
1 answer
Solr Query with 'in' and 'not in' for the same field
I'm completely new to Solr and, I'm trying to create a query that will return all the documents with one or more values in the 'ingredient' field (tab separated String), but exclude those that have some other values on the same field. We're running…

xburgos
- 381
- 3
- 10
1
vote
1 answer
How to write this Solr query in a more compact style?
Given a white space tokenized field containing only numbers, I want to write a query able to match the documents containing:
1) ALL the numbers in a Set A
AND
2) At least one of the numbers in a Set B
This is what I wrote
q=wstf:( 1 AND 2 AND 3 AND…

Max
- 2,508
- 3
- 26
- 44
1
vote
2 answers
Double negation in Lucene query
Lets say i have a binary field checked
Lets also assume that 3 documents out of 10 has checked:1 others checked:0
When I search in lucene
checked:1 - returns correct result (3)
checked:0 - returns correct result (7)
-checked:1 - returns correct…

NeatNerd
- 2,305
- 3
- 26
- 49
1
vote
1 answer
Word does not get analysed properly using StemmerOverrideFilterFactory and SnowballPorterFilterFactory for Dutch language
Solr: 3.5
Hi,
I created a dutch field type according to the following fieldType definition:

kdvr
- 55
- 4
1
vote
1 answer
How to get results in sorted order when I use facet limit in solr?
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.…

Karthik Surianarayanan
- 630
- 3
- 21
1
vote
1 answer
Lucene/Solr Sort results by order of ID's passed in
Using SOLR 3.6 I have a query like ?fq=nid:(4 6 2 3 1) and the results are coming back in a new order like (6 4 3 2 1) instead of the order passed in. Is there a way without using boosts to get the results it the same order as I passed in.

Marius Miliunas
- 1,023
- 18
- 34