This is what I am getting for this  query

q={!surround maxBasicQueries=4800} (name:(5w(apple,electro))) AND (popularity:5)


"rawquerystring":"{!surround maxBasicQueries=4800}
(name:(5w(apple,electro))) AND (popularity:5)",
"querystring":"{!surround maxBasicQueries=4800}
(name:(5w(apple,electro))) AND (popularity:5)",

 
"parsedquery":"+DistanceRewriteQuery(org.apache.lucene.queryparser.surround.query.DistanceRewriteQuery(name,
5w(apple, electro),
org.apache.lucene.queryparser.surround.query.BasicQueryFactory(maxBasicQueries:
4800, queriesMade: 1)))
+SimpleTermRewriteQuery(org.apache.lucene.queryparser.surround.query.SimpleTermRewriteQuery(popularity,
5, 
org.apache.lucene.queryparser.surround.query.BasicQueryFactory(maxBasicQueries:
4800, queriesMade: 1)))",

"parsedquery_toString":"+org.apache.lucene.queryparser.surround.query.DistanceRewriteQuery(name,
5w(apple, electro),
org.apache.lucene.queryparser.surround.query.BasicQueryFactory(maxBasicQueries:
4800, queriesMade: 1))
+org.apache.lucene.queryparser.surround.query.SimpleTermRewriteQuery(popularity,
5, 
org.apache.lucene.queryparser.surround.query.BasicQueryFactory(maxBasicQueries:
4800, queriesMade: 1))",

On Fri, Mar 17, 2023 at 5:05 PM Mikhail Khludnev <m...@apache.org> wrote:
>
> Hello Ritesh.
> Can you check debugQuery output to see how it's parsed?
>
> On Fri, Mar 17, 2023 at 8:37 AM Ritesh Kumar <imriteshkuma...@gmail.com>
> wrote:
>
> > Hello team,
> >
> > I have this query
> >
> > q={!surround}(field1:(10w(term1,term2))) AND field2:1199
> >
> > The field2  is of type solr.TrieIntField. I do not get any document
> > against this query. I am certain that the documents exists for the
> > above query.
> >
> > q={!surround}(field1:(10w(term1,term2))) works fine but using the
> > integer field2 does not fetch any result.
> >
> > I know that I can move the field2 part to fq but is there a way to
> > make it work with q only without changing the type of field2 to
> > string?
> >
> > Thank you.
> > Ritesh Kumar
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> https://t.me/MUST_SEARCH
> A caveat: Cyrillic!

Reply via email to