1. 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

Discussion in 'Enhanced Search Support' started by AndreaDB, Oct 11, 2014.

  1. AndreaDB

    AndreaDB Member

    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?
  2. Mike

    Mike XenForo Developer Staff Member

    Can you provide an example and can you reproduce it here? Have you enabled a stemming analyzer?
  3. AndreaDB

    AndreaDB Member

    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: Oct 12, 2014
  4. Robust

    Robust Well-Known Member

  5. AndreaDB

    AndreaDB Member

    Thanks Robust, but I would like to read the opinion of @Mike or another developer.
  6. Mike

    Mike XenForo Developer Staff Member

    "*" 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.

Share This Page