Closed (fixed)
Project:
Search API Solr
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2012 at 07:01 UTC
Updated:
16 Jan 2017 at 11:10 UTC
Jump to comment: Most recent
Comments
Comment #1
rooby commentedChanging focus a little.
There is an issue of interest in relation to this for the apachesolr module here #713142: Add configuration option to a search environment if we want to use Dismax or EDismax.
Comment #2
googletorp commentedIs there any plans on integrating wildcard searches for Seach API Solr using EDismax?
Comment #3
codewhisper commentedHi there.
I'm quite confused about the wildcard search option and the use of the Extended DisMax Query Parser (edismax).
Can someone explain what I need to do to use the wirldcard search?
I'm running Solr version 3.6.1 which should come ready with edismax. I also changed the solrconfig.xml to
<str name="defType">dismax</str>Also, I'm not using Views or anything similar. Just wanna query directly by using search_api_query. Maybe someone can give an example.
Thanks!
Comment #4
lex0r commentedIs anything done or at least planned to be done here? Any feedback is welcome, the community could draw a patch out of it :)
Comment #5
charlie-s commentedI'm currently doing this in
hook_search_api_solr_query_alter()to achieve it:This is how I have to alter the query in order to get string matching across fields; for example, "foo bar" returning a node with title containing "foo" and field_x containing "bar".
So perhaps putting the asterisk in the search field and setting the query type to dismax as in the example above could let OP achieve this.
I'm new to Solr and am not confident that forcing all wildcards is an acceptable approach. Is it very unperformant? I've seen this example elsewhere but am not sure on the other implications.
Comment #6
drunken monkeyAll of this has already been supported for more than half a year. The Search API Solr Search module already uses edismax by default. Just use the "direct" parse mode for your Search API query and wildcards, as well as all other special Solr syntax, should work as expected.
Comment #7
charlie-s commentedThanks drunken! admin/config/search/search_api/page and changing the query type to "direct query" did this and I was able to remove my nasty code.
Comment #9
goz commentedi spend some time to find where the "parse mode" setting was. It was finally noticed by drunken monkey in #1953366: Why keys are enclosed by double quotes?
I have no page settings, but find it in my view as explained.