[TYPO3-Solr] Different results from suggest and search
Ingo Renner
ingo at typo3.org
Tue Aug 9 20:53:29 CEST 2011
Am 09.08.11 19:58, schrieb Peter Kraume:
Hi Peter,
> The search string is "us24-978". In
> lib/SolrPhpClient/Apache/Solr/Service.php the search string is escaped
> to "us24\-978"
>
> For the suggestion, the facet.prefix is not escaped and still looks like
> this: facet.prefix=us24-978
nice find!
> I've now removed the dash from the pattern in the escape method in
> Service.php (line 195) and the search works.
>
> Since Lucene suggest to escape the dash, I ask myself what bad
> consequences it could have not to escape the dash.
None actually (in our case), I'd say. The dash in fact is important for
the standard request handler which supports the full Lucene query
language. There it is used as a NOT operator when put in front of a
search term.
But since we use the Dismax request handler - which doesn't understand
the full Lucene query language - it shouldn't matter.
It could be an issue with eDismax in Solr 3.1+ again, however. eDismax
is an enhanced Dismax request handler that supports Lucene query
language. We also switched to eDismax in trunk already.
However, we'll also have to remove the * character from the escape
pattern to support wildcard queries with Solr 3.1+ and eDismax.
best
Ingo
--
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code
TYPO3 - Open Source Enterprise Content Management System
http://typo3.org
Apache Solr for TYPO3 -
Open Source Enterprise Search meets Open Source Enterprise CMS
http://www.typo3-solr.com
More information about the TYPO3-project-solr
mailing list