<
From version < 47.1 >
edited by Marius Dumitru Florea
on 2014/02/25
To version < 48.1 >
edited by Marius Dumitru Florea
on 2014/02/25
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -52,6 +52,49 @@
52 52  
53 53  == Advanced Solr Search Suggest Sources ==
54 54  
55 +The [[Search Suggest>>Extension.Search Application||anchor="HSearchSuggest"]] feature retrieves live search results from various configurable sources. These sources specify the search engine to use and the search query. The search doesn't perform well, at least on Solr, if we use only the search query because each query is different (when the input text is different) so the cache is not used efficiently. Best is to rely on the filter cache but for this we need to be able to specify the filter query.
56 +
57 +Starting with this release you are able to specify more advanced search parameters in the search query and they will be passed directly to the search engine. This currently works with Solr. As an example, the following statement from the 'query' property of a Search Suggest Source
58 +
59 +{{code language="none"}}
60 +type:DOCUMENT AND (title:(__INPUT__*) OR name:(__INPUT__*))
61 +{{/code}}
62 +
63 +could be written as
64 +
65 +{{code language="none"}}
66 +fq=type:DOCUMENT
67 +qf=title^2 name
68 +{{/code}}
69 +
70 +Note that:
71 +
72 +* you would use the filter query which is the same for all search requests to this Search Suggest Source so it will be cached by Solr
73 +* you would be able to specify the boost for each field you want to search in
74 +* the query statement used is '~_~_INPUT~_~_' by default, if not specified.
75 +
76 +In order to preserve backward compatibility with existing Solr Search Suggest Sources, we use the following convention:
77 +
78 +> A line that doesn't start with 'xxx=' specifies the query statement; in other words, existing Solr Search Suggest Sources are specifying only the query statement.
79 +
80 +For example:
81 +
82 +{{code language="none"}}
83 +foo __INPUT__* bar
84 +fq=type:DOCUMENT
85 +qf=title^2 name
86 +{{/code}}
87 +
88 +means the query statement is 'foo ~_~_INPUT~_~_* bar'. Which is equivalent to:
89 +
90 +{{code language="none"}}
91 +q=foo __INPUT__* bar
92 +fq=type:DOCUMENT
93 +qf=title^2 name
94 +{{/code}}
95 +
96 +See the [[Solr common query parameters>>http://wiki.apache.org/solr/CommonQueryParameters]] and the [[Extended DisMax query parser parameters|http://wiki.apache.org/solr/ExtendedDisMax#Parameters]] documentation for details on what parameters you can pass to the search engine.
97 +
55 55  == Action API ==
56 56  
57 57  This [[Action API module>>extensions:Extension.Action API]] is the entry point for all UIs and in charge of calling the correct backend code to display what the user has asked for (it's the Controller in MVC terminology).

Get Connected