Re, Thanks for your reply. I mock my parser like this : @Overridepublic Query parse() { SpanQuery[] clauses = new SpanQuery[2]; clauses[0] = new SpanTermQuery(new Term("details", "london")); clauses[1] = new SpanTermQuery(new Term("details", "city")); return new SpanNearQuery(clauses, 1, true); } Thus i have a query like this spanNear([details:london, details:city], 1, true) If i do for example spanNear([details:london], 1, true) or spanNear([details:city], 1, true) i get my document.I have already add the parameter q.op = "OR", it doesn't work.
Le Samedi 13 juin 2015 17h21, Jack Krupansky <jack.krupan...@gmail.com> a écrit : What does does your exact query parameter look like? The parentheses in your message make it unclear. You have a comma in your query as if you expect this has some functional purpose. Technically, it should get analyzed away, but why did you include it? Do any queries find that document, or do all other queries find it and only this one fails to find it? Are you sure that you committed the document? Does a query by id find the document? Does your <field> for details have indexed="TRUE"? -- Jack Krupansky On Sat, Jun 13, 2015 at 5:54 AM, Test Test <andymish...@yahoo.fr> wrote: > Hi, > I have solr document, composed like this, with 2 fields : id = 1details = > "London is the capital and most-populous city of United Kingdom." > When i request solr with this parameter (details:london, details:city), i > don't get the document.The "details" field is a type "text_general" > <fieldType name="text_general" class="solr.TextField" > positionIncrementGap="100"> <analyzer type="index"> > <tokenizer class="solr.StandardTokenizerFactory"/> <filter > class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> > <!-- in this example, we will only use synonyms at query time > <filter class="solr.SynonymFilterFactory" > synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> > --> <filter class="solr.LowerCaseFilterFactory"/> > </analyzer> <analyzer type="query"> <tokenizer > class="solr.StandardTokenizerFactory"/> <filter > class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> > <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > ignoreCase="true" expand="true"/> <filter > class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> > What's wrong?