0

I tried using this example as search parameter "Share*" but the result return nothing.

Interestingly,if i try searching for the word "share" i do get the result containing the SharePoint word. That great but it only works with this particular example. If i try to search for "docume",i don't get the result "document" returned. My purpose for wild card is to search content of files only

            KeywordQuery keywordQuery = new KeywordQuery(clientContext);

            keywordQuery.QueryText = SearchParameter;

            keywordQuery.EnablePhonetic = true;



            keywordQuery.EnableOrderingHitHighlightedProperty = true;
            //keywordQuery.SummaryLength = 500;


            SearchExecutor searchExecutor = new SearchExecutor(clientContext);

            ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);

            clientContext.ExecuteQuery();
1

QueryText is always wild card if you are not specifying any column , it just check for 'Share' keyword in your content and if found will return result, not sure why you need wild card. Wildcard(*) only make sense when you are search values for a particular property.

You can add a * for suffix wildcard matching like below. last one is for phrase search so enclosed with quotes.

MyProperty:words or MyProperty:word* or MyProperty:"these words".

  • "QueryText is always wild card"--if i try searching for the word "share" i do get the result containing the SharePoint word. That great but it only works with this particular example. If i try to search for "docume",i don't get the result document returned. My purpose for wild card is to search content of files only. – Keshav Taurah Jun 24 at 5:20
  • @KeshavTaurah...are you sure you are not missing something...as i said by default it is wild card only....please check that particular document which is not returning is be in crawled or not... – Siddharth Vaghasia Jun 24 at 8:55
  • Vaghasia i actually figured it out,sometime the wildcard works without using * but if i used the * it works all the time – Keshav Taurah Jun 24 at 9:35
  • okay... please upvote and mark it as answer it was helpful.. – Siddharth Vaghasia Jun 24 at 10:11

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.