smart search index

merav tg asked on April 20, 2016 12:52

Hey

If a site has two different cultures, for example english and spanish (like dancing goat). I can see that the search index can support two cultures BUT if i set that when choosing Stop in analyzer type you can only choose one stop word language not multiple.

is there any way of changing this? can we make it in one search index look at two stop word files at the same time?

thank you

Recent Answers


Boris Pocatko answered on April 20, 2016 13:57

You can simply create two search indexes and in the search results web part just select both.

1 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on April 20, 2016 14:04

Hi Merav,

Stop words are used by Indexer while creating index. It is not something that happens on the fly. So I don't think what you are thinking is possible.

In this case you will have to create two indexes using appropriate Stop Words and then call that Index appropriately.

What you can do alternatively is to construct your query dynamically. Let's say you want to ignore stop words of englidh language like "a", "an", "the". SO before sending your query to the index you need to remove these words appearing as a part of your query. This way you will never search on these stop words.

You can extend this language to dynamically remove stop words as per language also.

Let me know if you need some code to remove stopwords.

Thanks, Chetan

1 votesVote for this answer Mark as a Correct answer

merav tg answered on April 20, 2016 15:25

there is also a Default option in the stop words.

what does this mean? changes when changing the site language? or taking the Default language which is english?

0 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on April 20, 2016 15:32 (last edited on April 20, 2016 15:32)

If you are building index for english then these are the stop words by default used unless you specify your own. These stop words are for Lucene irrespective of the programming language implementation.

STOP WORDS

Hope this helps, Chetan

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.