none
"*" is removed from the keyword query when perform search RRS feed

  • Question

  • Hi,

    I implemented the Enterprise Search site for the customer. In some documents, there is a coding such as "#145*".

    However, when I put "#145*" (with double quotes) , the search result also return the document that contains only "#145" (it seems * is removed from the search query).

     

    So, I just wonder that how can we perform exact search with "*" in the keyword query likes "#145*"?

    Regards,

    Andy

    Wednesday, January 11, 2012 10:01 AM

All replies

  • Hi Andy,

    Tokenization removes special characters during indexing.

    The workaround is to extract these special terms, replace "*" with for example "STAR", and assign the value to a separate managed property. Map this property into the full-text index (or have the crawled property you use be searchable). Then you would need to override the coreresults webpart to replace "*" with "STAR" when the query is being executed.

    And of course there are issues of highlighting to consider.

    Regards,
    Mikael Svenson


    Search Enthusiast - SharePoint MVP/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    Wednesday, January 11, 2012 10:55 AM
  • Hi Mikael,

     

    Thanks for your suggestion.

    Anyway, currently, I am in the process that I can config tokenization to allow * to be indexed and I can search from qr server with * in the fql.

    I guess the task that I need to do next is to extend the search core result webpart and just leave the original token there?

    Actually, I am not too sure what is the process in the query side that remove "*" from the original query. (before or after I send the query to FAST runtime)

    Anyway, I will let you know the result.

    Regards,

    Andy

    Wednesday, January 11, 2012 11:06 AM
  • Hi,

    The * should not be removed from the search query. (and I know you can tinker with the tokenization as long as you have ESP knowledge ;)

    Eg.: When I search for "frame*" in my search center the following fql is generated by the QR server:

    string( "frame*" )

    Regards,
    Mikael Svenson 


    Search Enthusiast - SharePoint MVP/WCF4/ASP.Net4
    http://techmikael.blogspot.com/
    Wednesday, January 11, 2012 12:42 PM