Hi Subhajit, that's weird, if you use StrField no text analysis happens. This means in the inverted index a single token is built for the text "abc xyz". So neither the query field:xyz neither the phrase query field:"xyz" is supposed to return you such document.
I would recommend running the query with debug=query enabled in the request parameters ( https://solr.apache.org/guide/6_6/common-query-parameters.html#CommonQueryParameters-ThedebugParameter ) In this way, we'll see how the query is parsed and the real fields involved in the query. Cheers -------------------------- Alessandro Benedetti Apache Lucene/Solr Committer Director, R&D Software Engineer, Search Consultant www.sease.io On Tue, 23 Mar 2021 at 17:39, Subhajit Das <subhajitdas...@live.com> wrote: > > Hi, > > I have a field with type string (StrField). The data in it is like “abc > xyz”. But when I search for “xyz”, I am getting one document containing > “abc xyz”. > > Using q and fq is same for this. > > When I filter like field=”xyz” it works, but field=xyz dosen’t. > > Thanks and Regards, > Subhajit >