on ‎2018 Aug 02 8:25 AM
Hi Experts,
I have the following requirement:-
In the search box for autosuggestions system is showing products with matching attribute value of search term.
Apart from matching this search term I need to match the category name also and system should show all matching products in that category.
Request clarification before answering.
Thanks Saurabh.
The client has changed the requirement :-
What they are looking for is that the search term should be matched in product name/description and all relevant categories of matching products should be shown as autosuggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear SPS
Solr create tokens out of your search term, Tokens get created based on the data in the 'text' type fields. So if you categoryName field is of type text then solr create tokens out of this field as well.
Now if you search for a term solr returns you the documents in which there are tokens that match the search term. In layman language, higher the number of matches, higher is the ranking of documents and higher the document would appear in the search result.
just to let you know, one solr document gets converted into one product data that you show at the frontend.
You can test it by creating some sample data. Create a product with product name as "Black leather bag" Put it in a category called "Tommy Hilfigher".
run solr indexing, once the data is in solr, go to solr console (https://localhost:8983/solr) and do a text search for Tommy Hilfigher, you product with name "Black leather bag" should appear.
Read solr wiki on how to do text search on solr console
Hope this helps, Let me know if you need more information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.