You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2015/08/05 21:59:05 UTC
[jira] [Resolved] (SOLR-7874) two terms in brackets interpreted as
range query
[ https://issues.apache.org/jira/browse/SOLR-7874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Erick Erickson resolved SOLR-7874.
----------------------------------
Resolution: Not A Problem
This is working as intended. The need to escape square brackets has been documented at least since since the 2.9 Lucene days, see:
https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Escaping Special Characters.
> two terms in brackets interpreted as range query
> ------------------------------------------------
>
> Key: SOLR-7874
> URL: https://issues.apache.org/jira/browse/SOLR-7874
> Project: Solr
> Issue Type: Bug
> Components: query parsers
> Affects Versions: 5.2.1
> Reporter: Ryan Steinberg
>
> Queries with two strings between brackets are parsed as range queries even when missing the " TO " keyword. This creates performance problems from extremely expensive unintended range queries.
> Example: [string1 string2]
> "rawquerystring": "[string1 string2]",
> "querystring": "[string1 string2]",
> "parsedquery": "(+DisjunctionMaxQuery((text:[string1 TO string2])))/no_coord",
> "parsedquery_toString": "+(text:[string1 TO string2])",
> "explain": {},
> "QParser": "ExtendedDismaxQParser"
> Same behavior for LuceneQParser:
> "rawquerystring": "[string1 string2]",
> "querystring": "[string1 string2]",
> "parsedquery": "text:[string1 TO string2]",
> "parsedquery_toString": "text:[string1 TO string2]",
> "explain": {},
> "QParser": "LuceneQParser"
> Three strings between brackets is parsed correctly by ExtendedDismaxQParser:
> "rawquerystring": "[string1 string2 string3]",
> "querystring": "[string1 string2 string3]",
> "parsedquery": "(+(DisjunctionMaxQuery((text:string1)) DisjunctionMaxQuery((text:string2)) DisjunctionMaxQuery((text:string3))))/no_coord",
> "parsedquery_toString": "+((text:string1) (text:string2) (text:string3))",
> "explain": {},
> "QParser": "ExtendedDismaxQParser"
> Query examples from live search application (copy and pasted book titles):
> The biology of cancer [electronic resource]
> Prostate cancer principles and practice. [1st ed.]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org