search-suggestion

Solr - How to obtain multiple suggestions for a query

独自空忆成欢 提交于 2019-12-11 13:20:05
问题 In the configuration file solrconfig.xml , is there a parameter to adjust tolerance in order to have multiple suggestions even if the number of different letters between the query & the suggestion is large? In my solrconfig.xml suggestion configuration, I have : The spellcheck search component : <lst name="spellchecker"> <str name="name">default</str> <str name="field">title</str> <str name="classname">solr.DirectSolrSpellChecker</str> <!-- the spellcheck distance measure used, the default is

Search suggestion in strings

六眼飞鱼酱① 提交于 2019-12-11 04:01:27
问题 I have a text file containing: mariam amr sara john jessy salma mkkkkkaooooorllll the user enters a word to search for: for example: maram As you can see, it does not exist in my text file .. I want to give suggestions, similar to the word maram is mariam I used longest common subsequence but it gives mariam and mkkkkkaooooorllll because both contain the Longest common subsequence "mar" I want to force the choice of mariam only Any ideas ? Thanks in advance /** ** Java Program to implement

Limiting the number of search suggestions, android

岁酱吖の 提交于 2019-12-11 03:39:59
问题 Is there a way to limit the number of displayed suggestions, when using the search interface with custom search suggestion? Thanks! 回答1: It's very simple actually. Firstly in your ContentProvider , define a variable to have a reference to: public static final String LIMIT_PARAMETER = "LIMIT"; In your Cursor query @Override of the provider define something to hold your limit value String limit = uri.getQueryParameter(LIMIT_PARAMETER); Then pass the limit to the SqliteQueryBuilder : final

Elasticsearch - Fuzzy, phrase, completion suggestor and dashes

戏子无情 提交于 2019-12-10 20:37:25
问题 So I have been asking separate questions trying to achieve the search functionality I would like to achieve but still falling short so thought I would just ask people what they suggest for the optimal Elasticsearch settings, mappings, indexing and query structure to do what I am looking for. I need a search as you type solution that queries categories. If I typed in "mex" I am looking to get back results like "Mexican Restaurant", "Mexican Grocery Store", "Tex-Mex Restaurant" and "Medical

Android: getSearchableInfo(getComponentName()) returning null?

依然范特西╮ 提交于 2019-12-10 12:35:30
问题 I'm trying to get suggestions for SearchView. I've implemented a custom content provider for it. I've also referred to this link to implement suggestions for the SearchView. The problem I'm facing is, I get null value on searchManager.getSearchableInfo(getComponentName()) Here are the snippets: AndroidManifest.xml <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <provider android:name=".SearchProvider" android:enabled="true"

Elasticsearch completion suggest search with multiple-word inputs

安稳与你 提交于 2019-12-09 06:07:59
问题 Using the Elasticsearch completion suggester I have problems returning multi-word input suggestions matching a one-word query. Example structure: PUT /test_index/ { "mappings": { "item": { "properties": { "test_suggest": { "type": "completion", "index_analyzer": "whitespace", "search_analyzer": "whitespace", "payloads": false } } } } } PUT /test_index/item/1 { "test_suggest": { "input": [ "cat dog", "elephant" ] } } Working query: POST /test_index/_suggest { "test_suggest":{ "text":"cat",

What Elasticsearch Analyzer to use for this completion suggester?

和自甴很熟 提交于 2019-12-07 07:47:54
问题 I'm very new to Elasticsearch and am currently trying to get my head around analyzers with respect to the completion suggester I have a list of places like so: London The London Eye The London Dungeon etc... By setting the mapping for a completion suggester to the following: 'place_suggest': { 'type': 'completion', 'payloads': true, 'index_analyzer' : 'stop', 'search_analyzer' : 'stop', 'preserve_position_increments' : false } I am now able to get all three of the above suggestions returned

Implementing Suggestions 'xxx in Category' using elasticsearch

会有一股神秘感。 提交于 2019-12-07 07:14:55
问题 I want to implement amazon-like 'in-category' suggestions for products. Amazon proposes to search for a given term in a specific category instead of a global search. This allows for a more specific search and results. Is there a way how to implement this using one of the suggestion functions provided by elasticsearch? Currently my idea is to get the suggestions from elasticsearch and group them by category as a post processing. Is there something built in, returning the ready 'in-category'

Implementing Suggestions 'xxx in Category' using elasticsearch

限于喜欢 提交于 2019-12-05 16:16:56
I want to implement amazon-like 'in-category' suggestions for products. Amazon proposes to search for a given term in a specific category instead of a global search. This allows for a more specific search and results. Is there a way how to implement this using one of the suggestion functions provided by elasticsearch? Currently my idea is to get the suggestions from elasticsearch and group them by category as a post processing. Is there something built in, returning the ready 'in-category' results? If you know categories in advance, you could pass them as payload using completion suggester . I

What Elasticsearch Analyzer to use for this completion suggester?

淺唱寂寞╮ 提交于 2019-12-05 15:02:34
I'm very new to Elasticsearch and am currently trying to get my head around analyzers with respect to the completion suggester I have a list of places like so: London The London Eye The London Dungeon etc... By setting the mapping for a completion suggester to the following: 'place_suggest': { 'type': 'completion', 'payloads': true, 'index_analyzer' : 'stop', 'search_analyzer' : 'stop', 'preserve_position_increments' : false } I am now able to get all three of the above suggestions returned when the suggesters text input is simply the letter L However I would like The London Eye to be returned