On 1/27/2016 11:31 PM, diyun2008 wrote: > Thank you for you reply. > But The weird place is why it can return result by condition > (q=title:#7654321) and condition (q=title:7654321*) or (q=title:7654321). > > From your assumption, the condition (q=title:#7654321) should not return > result as well.(But it does return hit result).
When the query does NOT have a wildcard, the defined query analysis on the field is used. The query analysis for this particular field includes a tokenizer or a filter that strips # characters, so the query matches. When the query DOES have a wildcard (* or ? characters), any defined query analysis is completely skipped, so the # character is not stripped from the query. It will not match what's in the index. The example of q=title:7654321* matches because it does not contain the # character. Thanks, Shawn