Simple Solr Autocomplete Challenge

I have a very simple SQL table that I want to import into Solr, but because of the features I want to search, I cannot determine the best schema.

The user will begin to enter the input in the input field, and after 3 characters, he will send a request to the server and get the most relevant results, returning the 15 best matching identifiers and name.

Table ex)

id | name
----------------
1 | boating magazines
2 | boats weekly
3 | boaters collection
4 | shipping lane
5 | ships today

Search and Expected Income ex)

boa | [1, boating magazines], [2, boaters weekly], [3, boaters collection] 
boat | [1, boating magazines], [2, boaters weekly], [3, boaters collection], [4, shipping lane], [5, ships today]
shi | [4, shipping lane], [5, ships today]
ship | [1, boating magazines], [2, boaters weekly], [3, boaters collection], [4, shipping lane], [5, ships today]
boating | [1, boating magazines], [2, boaters weekly], [3, boaters collection], [4, shipping lane], [5, ships today]

(obviously they will be returned as xml)

Any information on how I will achieve this will be appreciated. Thank.

+3
source share
2 answers
+2

?

, ? - XML ....

schema.xml? , , _s, .

?... , myfield_string:"boa*"

, xml? ? json !

? http://lucene.apache.org/solr/tutorial.html

?

. Solr . : http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/

. , - " " - ? . , ...

0

Source: https://habr.com/ru/post/1766088/


All Articles