Questions tagged [query-parser]
69 questions
0
votes
2 answers
searching lucene index on multiple fields
I have an index with 2 content fields (analyzed, indexed & stored):
for example: name , hobbies. (The hobbies field can be added multiple times with different values).
I have another field that is only indexed (un_analyzed & not stored) used for…

epeleg
- 10,347
- 17
- 101
- 151
0
votes
0 answers
Print the clauses from QueryParser
Is there an easy way to get debug info on what the actual subqueries that the QueryParser generates (ie: BooleanQuery, PrefixQuery, WildCardQuery, etc)?

pvgoddijn
- 12,638
- 15
- 47
- 56
0
votes
1 answer
search with lucene's QueryParser while setting fieldName to "*" failed?
I want to search through all fields in the index by lucene, and I learned to do this by writting the code like this:
//Create a parser that searches through all fields
QueryParser queryParser = new QueryParser("*", new StandardAnalyzer());…

yang he
- 1
0
votes
1 answer
How to parse a simple search query with PHP?
So I like to have a simple (custom) search query. That exists of two things a PASSWORD and a DATE. So I can construct something like: DATE BEFORE "01-11-2022 14:00" AND (PASSWORD IS "welcome" OR PASSWORD IS "1234").
My thoughts about parsing this is…

Mark
- 16,906
- 20
- 84
- 117
0
votes
1 answer
Problem with Proximity search Lucene. Field "content" was indexed without position data
so as in the title when I'm trying to search for a query i get an error
Exception in thread "main" java.lang.IllegalStateException: field
"content" was indexed without position data; cannot run PhraseQuery
(phrase=content:"to be not"~1)…

ReallyNicePerson
- 49
- 6
0
votes
0 answers
Retrieving concatenated field value in solr
Enviornment ==> solr - solr-8.9.0, java version "11.0.12" 2021-07-20 LTS
Following .csv file is indexed in solr
id,cat,name,price,inStock,author,series_t,sequence_i,genre_s
0553573403,book,Game Thrones Clash,7.99,true,George R.R. Martin,"A Song of…

user595014
- 114
- 3
- 8
- 20
0
votes
0 answers
Convert surround query parser to lucene query
Surround Query Parser
(spot prices) 3w (gulf coast)
to
Lucene Query
("spot"~3 or "prices"~3) or ("gulf"~3 or "coast"~3)
Is there easy way convert surround query to lucene query?

nkhcode
- 87
- 1
- 8
0
votes
2 answers
Query Parser in C#
I'm making parser which help to parse the data from Query string in API endPoint.
e.g. https://testt.ap.com/testdata/v1/data?fq= ((A AND B) OR (C AND D))
I need to parse the data and pass it to LINQ which will connect with database and get the…

user2932395
- 427
- 1
- 5
- 21
0
votes
0 answers
how to make my search system answer the query with boolean operation (+ - or)?
I'm using Lucene for the first time I'm trying to make a search system with the following query...
QueryParser qp1 = new QueryParser("title", new StandardAnalyzer());
Q1 = qp1.parse(tr.toString()); // The same think for Q,Q2,Q3
…

asma bzd
- 11
- 3
0
votes
1 answer
Syntax Error, cannot parse from lucene StandardQueryparser when using fq(filtered query)
I am trying to pass a java String to Apache StandardQueryparser to get the Querynode.
Input - "fq=section:1"
All I need is section:1 in FILTER clause in QueryNode. This looks pretty straightforward but it throws
INVALID_SYNTAX_CANNOT_PARSE: Syntax…

dj308
- 47
- 3
- 6
0
votes
1 answer
Which query parser should I use to get results similar to db2 with solr
I am trying to get results similar to db2 with solr query.
Since we want results similar to db2, we are appending a wild card at the end of the query phrase.
For example, if query is passed as 'the schoo*', then I want following results :
the…

javaAndBeyond
- 520
- 1
- 9
- 26
0
votes
2 answers
How to run SQL Expression Query without any underlying database
I have a situation where the user enters some validation input in SQL format.
This SQL query is just using basic sql date functions but not using any databse column.
Sample query:
Select UNIX_TIMESTAMP(NOW()) < UNIX_TIMESTAMP(CASE WHEN…

dev541
- 53
- 2
- 6
0
votes
1 answer
How to allow leading wild cards in custom smart search web part (Kentico 10)
I have a custom index for my products and I am using the Subset Analyzer. This Analyzer works great, but if you do field searches, it does not work.
For example, I have a document with the following fields:
"documentname",…

Austin Perez
- 587
- 7
- 27
0
votes
2 answers
What is an alternative for Lucene Query's extractTerms?
In Lucene 4.6.0 there was the method extractTerms that provided the extraction of terms from a query (Query 4.6.0). However, from Lucene 6.2.1, it does no longer exist (Query Lucene 6.2.1). Is there a valid alternative for it?
What I'd need is to…

Peter
- 399
- 2
- 6
- 23
0
votes
0 answers
/browse handler (velocity UI) not initiating CustomQueryParser
I have defined my CustomQueryParser in my RequestHandler.
Below is the RequestHandler part of the code in solrconfig.xml

Mrinalini Hanagodu
- 11
- 3