Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible with either KQL or FQL to query for title:*or* and get back items where the tile is e.g "A.B.PZ.3_MS_Form" ? Another query would be title:*PZ*.

Background: I have a custom advanced search and fight with the contains drop down for the title property. Starts-with, ends-with and equals are working. Its for SP2010+FS4SP

share|improve this question
add comment

3 Answers 3

Your best approach is to get titles on those weird formats into a separate managed property. Then you can do word searches on that property in FQL with less chance of the query bombing.

It's all about term expansion in the search engine core and how many terms would match and how big(slow) will the end query be.

The other approach is to create a full text index with n-grams enabled.

share|improve this answer
    
So the title property is the problem? I am aware that the term expansion is the root cause, but I dont understand why another managed property would help. Could you give me an example please? –  Max Melcher Apr 28 '13 at 19:39
1  
No, another one would not help if it duplicated all values in the current Title property. But if you only pull over the "weird" titles, then it might can help as that mp will have fewer values. –  Mikael Svenson Apr 29 '13 at 9:15
add comment

If you do a KQL query with title:or* you will see the results you are asking for. You do not need to put the leading wildcard as it does that automatically.

share|improve this answer
    
Nope, that does not work. Have you tried it? –  Max Melcher Apr 10 '13 at 17:35
    
I was working with something similar the other day and that was the behavior I was seeing. I ended up having to change over to use the FQL and starts-with to get around it. –  Mike Oryszak Apr 10 '13 at 17:38
    
Does starts-with(title,"*or") work or can you provide me a screenshot of your query/result? –  Max Melcher Apr 10 '13 at 17:45
add comment

This is NOT possible with Managed Property keyword queries. The only wildcard capability that Sharepoint Search Server 2010 supports is "Stemming". Stemming expects the characters to be matched by the characters at the start of a string in the index.

e.g. Item contains Title string "TestMe"

You're query can be : Title:"Tes" and that would pick up the TestMe item.

You would have to enable stemming in your Core Results Webpart or in a custom scenario, enable it on a FullTextSqlQuery object.

share|improve this answer
    
Apparently I need contains. What I dont understand is that the values are stored in the Property DB - why is a simple contains query not possible? –  Max Melcher Apr 10 '13 at 17:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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