1

I am building a search based A to Z (as it needs to run across site collections) on SharePoint 2013 and need to be able to find all pages where their 'AZText' managed property value starts with a given letter. I anticipated that I would need to use the following syntax:

AZText:A*

However this is returning all instances where any word in that field begins with "A", not just the first word. So it returns "Apples and Oranges" but also returns "Happily Ever After".

Does anyone know if it is possible to restrict this search to the whole value of the field so that "starts with" means the whole text and not each word within that text?

3

This is not doable with KQL or FQL. You would have to do some post-processing to accomplish this. FQL has an operator called starts-with, but cannot be used with wildcards, only terms or phrases.

If you could have another property on the list with AZText which copies the first letter of the value of AZText field, then that would work. Or if you do this in a content enrichment web service. Then this property could be used to search/group results per the first letter.

  • 1
    Thanks for that Mikael. I always seem to find the missing functionality... I am creating a custom web part for this using the Search API so I will just do some additional, non-Search, filtering on the Search results. That should be simpler than additional fields or Content Enrichment. Thanks for your input. – j.strugnell Dec 16 '14 at 12:02
  • @j.strugnell You have no idea how many times I've hit the wall as well and have to figure out a work around :) – Mikael Svenson Dec 17 '14 at 20:37
0

MaxCharactersInPropertyStoreIndex=1 on a new managed property might do the trick, so it is limited to only storing a single character in the index (this should theoretically be available in PowerShell (but not in GUI).

  • Hi Thomas, this may work, but in my case I needed to output the full managed property so needed to store the full text. Thanks. – j.strugnell Oct 19 '16 at 10:43

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.