Smart Search and excluding fields

Brenden Kehren asked on July 27, 2015 15:56

I've got a page type with about 20 fields. Each field has their search properties set properly. I have a search index that I only want my index to search 2 fields out of the 20 but the other indexes I have I want to include all 20 fields when it searches. How could I accomplish this?

Recent Answers


Roman Hutnyk answered on July 29, 2015 04:01

Using Where condition in the search results page is the easy way, but kind of fake.

Custom search index should be able to handle this.

0 votesVote for this answer Mark as a Correct answer

Roman Koníček answered on August 10, 2015 14:38

Hi Brenden,

Could you please explain the reason why you need to use two indexes? Why not to use one index with all 20 fields? Understanding your scenario might help us to suggest a different solution to achieve your goal.

Best regards, Roman Konicek

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 10, 2015 14:50

Roman Konicek, I have two different distinct needs: 1 is for an auto complete list and the other would be a site search.

For the auto complete, I only want the first and last names searched. The site search, I want the full 20 fields content searchable. I've attempted adding a condition in the search results webpart to only search on those fields but it searches all the fields.

1 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 10, 2015 21:40

Have you tried using a weighted search for the Auto Complete? If the FirstName and LastName are searchable fields, you can do FirstName("Bob") LastName("Bob") and the results should work for suggestions.

I agree you should only need 1 index for both, and just make sure it only does the parameterized search and not on the general content. Hit me up brenden if it's giving ya trouble!

0 votesVote for this answer Mark as a Correct answer

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