[TYPO3-Solr] Wildcards in search word
Ingo Renner
ingo at typo3.org
Tue Aug 23 13:46:47 CEST 2011
Am 22.08.11 15:40, schrieb Kerstin Huppenbauer:
Hi Kerstin,
> i get it to work now with Solr 1.4. The problem was the missing query
> type in my request.
> i changed $query->keywords from protected to public and added these 2
> lines in the query modifier:
> $query->setQueryType('standard');
but now you're obviously not using the dismax request handler anymore...
The standard query parser is meant for queries "generated by forms",
whereas the dismax query parser is meant for things we do with Solr in
TYPO3: web search with user input.
The dismax query parser has some more advantages over the standard query
parser like searching multiple fields, boosting and more... However, the
standard query parser supports the full Lucene query syntax (including *
for wildcards), whereas edismax doesn't. So this is why your change
works, but it's still a hack though.
In Apache 3.1+ there is the edismax query parser whcih combines bes tof
both worlds...
Anyway, wildcard support is now in trunk - both EAP and public. You need
Apache Solr 3.1+ with edismax for it...
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