[TYPO3-Solr] Different results from suggest and search

Peter Kraume usenet at kraume.de
Tue Aug 9 19:58:40 CEST 2011


Am 09.08.2011 15:45, schrieb Ingo Renner:
> For now I'd suggest to modify the suggest dropdown to say it's
> "about/ca." so and so many expected resutls
>

Sorry, but this is not an option since there is exactly one page ony my 
website which contains the search string (a web code) and so it needs to 
be found by both, suggestion and search.

I've debugged a lot the last days and I think I've found the error:

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

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.
See 
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Escaping%20Special%20Characters

Any ideas?

Thx
Peter


More information about the TYPO3-project-solr mailing list