• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Problem with elasticsearch and wildcard character as keyword

#1
With enhanced search a strange thing happens: a search with a textual keyword and some other filter produces more results than a search with the wildcard character as keyword and the same filter.
How is this possible? Is a bug or a misconfiguration of elasticsearch?
Thanks
 

Mike

XenForo developer
Staff member
#2
Can you provide an example and can you reproduce it here? Have you enabled a stemming analyzer?
 
#3
Hi Mike,
for example on this site a search for keyword "xenforo" in the subforum "Xenforo Suggestions" produces more results than a search with the wildcard character as keyword in the subforum "Xenforo Suggestions".
search 1 (with keyword "xenforo"): 171 results http://xenforo.com/community/search/search/?keywords=xenforo&type=post&nodes[]=18
search 2 (with keyword "*"): 100 results http://xenforo.com/community/search/search/?keywords=*&type=post&nodes[]=18

In this case probably happens because are also displayed the posts in the search with a textual keyword, but my case is more complicated because doing the searching with wildcard, not find some results if I use in the filter a custom field of @Waindigo. Instead this does not happen in the standard search.

I have enabled a stemming analyzer.
 
Last edited:

Mike

XenForo developer
Staff member
#6
"*" isn't a wildcard query on its own. It appears to actually be matching posts with a * in it. Searching without a keyword isn't expected, except in specific cases where it is allowed.