SharePoint Developer Center > SharePoint Products and Technologies Forums > SharePoint - Search > how to use IgnoreAllNoiseQuery property and EnableStemming corretly?
Ask a questionAsk a question
 

Answerhow to use IgnoreAllNoiseQuery property and EnableStemming corretly?

  • Friday, November 06, 2009 8:36 AMAllenYU Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    When using search query services to get search result, if I query the keyword like "a", "the", the services will throw an exceptions, says they are common words.
    But Seems I change the IgnoreAllNoiseQuery property (whatever false or true) in query xml, it's not useful, the exception still be thrown.

    Anyone can help to explain this?

    Other problem is: when I query keywords like "Build", the result will return different terms like "Build", "Built", but only "Build" is highlighted. How can we make other terms of the word to be highlighted?

    Thanks.



     

Answers

All Replies

  • Friday, November 06, 2009 9:21 AMYogesh Shetty- A SharePoint Geek Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Its by design property set by SharePoint. you can try changing it by editing query XML file as follows:

    <SearchTemplates>
      <QueryPacketTemplate>
        <QueryPacket xmlns="urn:Microsoft.Search.Query">
          <Query>
            <SupportedFormats>
              <Format>urn:Microsoft.Search.Response.Document.Document</Format>
            </SupportedFormats>
            <Context>
              <QueryText type="STRING" language="en-us">searchkeyword</QueryText>
            </Context>
            <Range>
              <StartAt>1</StartAt>
              <Count>10</Count>
            </Range>
            <Properties>
              <Property name="Title"/>
              <Property name="Path"/>
              <Property name="Description"/>
              <Property name="Write"/>
              <Property name="Rank"/>
              <Property name="Size"/>
              <Property name="Author"/>
              <Property name="HitHighlightedSummary"/>
            </Properties>
            <EnableStemming>true</EnableStemming>
            <TrimDuplicates>true</TrimDuplicates>
            <IgnoreAllNoiseQuery>true</IgnoreAllNoiseQuery>
            <ImplicitAndBehavior>true</ImplicitAndBehavior>
            <IncludeRelevanceResults>true</IncludeRelevanceResults>
            <IncludeSpecialTermResults>true</IncludeSpecialTermResults>
            <IncludeHighConfidenceResults>true</IncludeHighConfidenceResults>
          </Query>
        </QueryPacket>
      </QueryPacketTemplate>
    </SearchTemplates>

  • Friday, November 06, 2009 9:59 AMAllenYU Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you Yogesh. But I don't think it will work.

    For the first one, should I empty the noise word list if I want to query noise words?

    For the second one, is it designed by default?
  • Friday, November 06, 2009 3:27 PMYogesh Shetty- A SharePoint Geek Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Allen,

    You can empty the noise word list and then restart Osearch and perform full crawl again and then you will be able to query those noise words. For more information, you can follow below technet article:

    http://technet.microsoft.com/en-us/library/dd361733.aspx

    Regards,
    Yogesh.