Questions tagged [solr-query-syntax]
175 questions
0
votes
0 answers
Solr search not giving proper result when search for special character
I am trying to search field which has "\r\n" both together in the field.
I tried this query but it did not work:
fq
Field:"*\r\n*"
But this gives result along with field has "\" only. I just want result for which field contains whole "\r\n".

Dhwani
- 7,484
- 17
- 78
- 139
0
votes
1 answer
Highlighting only the entire phrase in custom Solr Query builder in Java
I'm trying to let Solr highlight only the entire phrase and not every word of the query. Supposing stopwords aren't a problem, my query phrase is: "hello darkness my old friend" and the highlighted result will be: "hello darkness…

Marco Frag Delle Monache
- 1,075
- 5
- 16
0
votes
0 answers
Is there a way to boost based on value of an index property in Hybris solr?
We have a requirement wherein we need to make boosting for a field dynamic. Let's say that we have an indexed property foo, we need to perform a mathematical calculation on foo to determine its boost value which would be different for every…

Rupesh Vislawath
- 125
- 1
- 11
0
votes
1 answer
In Solr, how to get all the unique values from a field? there are more than 100 values?
Below query gives be the unique values of that field. But it returns only top 100. Not sure how to get all the unique values.
"'http://localhost:8983/solr/select/?q=%3A&rows=0&facet=on&facet.field=txt'"
PS: My field is a tokenized field. Not sure if…

Nkl Kumar
- 41
- 4
0
votes
1 answer
Solr TermFreq with conditional Filterquery
Hi Im trying to build a query in c# using solr:
Query.Append($"&fq={{frange l=3}}termfreq(Description,'keyword') OR {{frange l=1}}termfreq(title, 'keyword'")"
While this one below works :
Query.Append($"&fq={{frange…

Suman Baul
- 133
- 1
- 11
0
votes
1 answer
Solr query for child documents and return parents and filtered children
I'm having trouble creating a Solr query to be able to pull out the right documents, and am starting to wonder if what I am trying to do is even possible.
Currently on Solr 8.9 using a managed schema and every field is using a wildcard…

Twisterr1000
- 39
- 7
0
votes
1 answer
Solr Pattern replacement filter after Ngram filter
Basically I am trying for spell correction to some extent, I am using query analyzer as mentioned,

Karthick S
- 19
- 2
- 6
0
votes
1 answer
Query SolR for uniq value in multiple field
i'm looking for a particular SolR query that can select a value in a field, only if it is unique.
for exemple, here is some documents :
1
abc;def;ghi
2
…

Patrick Ferreira
- 1,983
- 1
- 15
- 31
0
votes
0 answers
solr query to fetch documents by the number of missing matches from the target multivalued field
I am trying to write a SOLR query to match documents with a multi-valued target field. I'd like SOLR to retrieve the documents that contain at least one of the the query terms plus a maximum specified number of terms. For example, consider the…

bfaskiplar
- 865
- 1
- 7
- 23
0
votes
1 answer
Customized Boosting in Solr
I'm using Solr in a search app, where data has been divided in different types but in same collection. Each document in collection has d_type field which defines the type of data.
Example
Consider I have 5 type of…

Tayyab Hussain
- 1,658
- 1
- 18
- 21
0
votes
1 answer
Range facet with different gaps/steps in Solr
Currently the request is
{
"query": "*:*",
"facet": {
"prices": {
"type": "range",
"field": "price",
"start": 0,
"end": 100,
"gap": 20
}
}
}
I need to retrieve the counts for the ranges
0 TO 5
5 TO 10
10…

user13674325
- 339
- 2
- 14
0
votes
1 answer
Solr non-null query
What is the difference between the following two Solr queries, and which should be used when searching for null/non-null values?
fieldName:[* TO *]
fieldName:['' TO *]

Matt
- 902
- 7
- 20
0
votes
0 answers
How do I add multiple negative joins in Apache Solr?
I would like to exclude employees from employee collection with the hire date after 01/01/2020 and the status as active from the bonus collection. So I need to do a negative join with the employee collection and have 2 criteria. Here is my sample…

Gaurav
- 1
0
votes
1 answer
How to make SOLR search function return the result based on search input order
im using SOLR to perform text query on a multivalued field but its not returning as per what the input. im using edimax with standard tokenizer on the fields.
for example, i search for the text "A B C", but im getting weird order result
result #1:…

normal_user
- 3
- 1
0
votes
0 answers
How to add conditionals or filters to a solr terms query for autosuggest
I've implemented a solr terms query for an auto suggest component.
This is how a regular query looks like:
https://myserver.com/solr/mydata/terms?omitHeader=true&wt=json&json.nl=flat&terms=true&terms.regex=.%2my search…

Randy
- 33
- 7