3

Situation:

  • Typing in 'ABC' for a search field associated with 'Field1' will return documents containing values such as 'ABC', 'ABCD', etc. Each field will either have its own associated search field, or maybe the user can choose in a drop down menu next to the field.

What I've Tried:

  • Managed Navigation While managed navigation allows the user to filter through the fields using existing metadata terms, it does not allow for open text. Using the example situation above, typing in 'ABC' (if the term exists) will only return documents that have 'ABC' in the field.
  • Native Search Feature In both the search bar at the top of the document library, and the bar at the top of the site collection, I can type in 'ABC' and it will return items that match that query. However, it won't let me know where that value was chosen from. I only get to see the results.
  • Managed Properties Users can type in a search query like 'Field1:ABC', but that requires the user to know the search field.

Is there a way to merge all of these features into one? (Fingers crossed for OOTB solution?). Ideally, I'm imagining something like the managed navigation, but just with open text.

If anyone has any insight or could point me in the right direction, I'd really appreciate it!


To further illustrate the situation: each document will have several (example) fields related to it.

  • Animal
  • Colour

Given those fields, we could have the following documents in the document library:

  • Squirrel_Field_Guide.docx {Animal:Squirrel, Colour: Dark Grey}
  • Animal_Shelder_List.docx {Animal:Doc, Colour: Red}
  • ComicsComicsComis.xlsx {Animal:Flying Squirrel, Colour: Bright Red}

These fields are metadata fields, with corresponding groups in the MMS. The goal was to have users search by these field values:

Scenario 1: User searches for the term 'squirrel' for the 'Animal' field. Both Document 1 {Animal:Squirrel} and 3 {Animal:Flying Squirrel} are returned.

Scenario 2: User searches for the term 'red' for the 'Colour' field. Both Document 2 {Colour:Red} and 3 {Colour:Bright Red} are return.

Scenario 3: User searches for the term 'zebra' for the 'Animal' field. Nothing is returned. (Normal search behaviour).

Essentially, it's like open text search, but with the ability to narrow down the field that the query text applies to in a user friendly way. While - if users knew the managed property name - it is possible to type in 'Colour:"Red"' into the search bar, I was hoping to find a better way for users to choose fields to search by with the UI.

  • Have you looked at query rules that elevate the rank of documents when the term is matched in your target field? Also, have you also looked at Query Rules like the one that matches on a MMS term? Can you expand on your "situation" to explain a bit more about the user experience you seek? – Matthew McDermott Jul 14 '17 at 16:16
  • Good morning, Matthew! Thank you for your reply! I have updated the post with a further explanation of the situation. In the mean time, I will look into query rules! – Shepherd Jul 15 '17 at 17:29
  • You can use refiners too, to allow users to filter or narrow down. You have to look more in search schema and then crawled properties, managed properties. @Matthew McDermott video (channel9.msdn.com/Events/SharePoint-Conference/2014/SPC322) help you to understand entire search backend components. That'd give you a lot of ideas for your solution. – John Zachariah Jul 16 '17 at 1:13
2

The easiest approach would be to use Refinement. You will create Refinable managed properties for each of your fields and then add those properties to the user interface in the search center by adding them to the refinement web part. You could go further by adding Query Rules that detect a match on fields and promote links to exact match content.

  • Thanks Matthew! By setting the terms to 'multiple refinement', I was able to access some sort of open field search. The only downside is that there are around 50 fields per document, so adding all of them seems to affect search results. It makes it look not the best, but it's a start. – Shepherd Jul 17 '17 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.