lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: eDisMax parser and special characters
Date Wed, 08 Oct 2014 21:55:09 GMT
Hyphen is a "prefix operator" and is normally followed by a term to indicate 
that the term "must not" be present. So, your query has a syntax error. The 
two query parsers differ in how they handle various errors. In the case of 
edismax, it quotes operators and then tries again, so the hyphen gets 
quoted, and then analyzed to nothing for text fields but is still a string 
for string fields.

-- Jack Krupansky

-----Original Message----- 
From: Lanke,Aniruddha
Sent: Wednesday, October 8, 2014 4:38 PM
Subject: Re: eDisMax parser and special characters

Sorry for a delayed reply here is more information -

Schema that we are using -
Request Handler in config -

Some analysis -

Search term: red -
Parser eDismax
No results show up
<str name="parsedquery">(+((DisjunctionMaxQuery((name_starts_with:red^9.0 | 
name_parts_starts_with:red^6.0 | s_detail:red | name:red^12.0 | 
s_detail_starts_with:red^3.0 | s_detail_parts_starts_with:red^2.0)) 
DisjunctionMaxQuery((name_starts_with:-^9.0 | 

Search term: red -
Parser dismax
Results are returned
<str name="parsedquery">(+DisjunctionMaxQuery((name_starts_with:red^9.0 | 
name_parts_starts_with:red^6.0 | s_detail:red | name:red^12.0 | 
s_detail_starts_with:red^3.0 | s_detail_parts_starts_with:red^2.0)) 

Why do we see the variation in the results between dismax and eDismax?

On Oct 8, 2014, at 8:59 AM, Erick Erickson 
<<>> wrote:

There's not much information here.
What's the doc look like?
What is the analyzer chain for it?
What is the output when you add &debug=query?

Details matter. A lot ;)


On Wed, Oct 8, 2014 at 6:26 AM, Michael Joyner 
<<>> wrote:
Try escaping special chars with a "\"

On 10/08/2014 01:39 AM, Lanke,Aniruddha wrote:

We are using a eDisMax parser in our configuration. When we search using
the query term that has a ‘-‘ we don’t get any results back.

Search term: red - yellow
This doesn’t return any data back but

CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities 
laws. Unauthorized forwarding, printing, copying, distribution, or use of 
such information is strictly prohibited and may be unlawful. If you are not 
the addressee, please promptly delete this message and notify the sender of 
the delivery error by e-mail or you may call Cerner's corporate offices in 
Kansas City, Missouri, U.S.A at (+1) (816)221-1024. 

View raw message