Public Api Search Wildcard

I'd like search to work with partial matches. It seems that I only get results if a search term matches an entire word of what I'm looking for.

Here's what I'm trying to do:

Use the public api "Search"  object to auto-complete a field which takes a "Group" name. So essentially I'm calling this line of code:

Ext.SearchResults results = PublicApi.Search.List(options);

with options.Query = [whatever the user types in] after 4 characters are typed into the field.

I tried using * in the query but it still won't return partial matches. Is there something else I need to do? Or is there a different value for a wildcard?

Any help would be appreciated.

Regards,

-Paul

  •  
    This is a well-known “limitation” of the dismax query parser within Solr 1.4. The asterisk will removed unless you issue a fielded search.  The workaround is to issue a fielded search.  Ex. “title:bla* OR content:bla* OR tag:bla*”
     
    Note: Stating with Evolution 7.x, the supported version of Solr is 3.6 which contains an improved query parser that does allow wildcards in non-fielded searches.
     
    Kevin
     
    From: pfarina@hugeinc.com [mailto:bounce-pfarinahugeinccom@communities.telligent.com]
    Sent: Tuesday, January 22, 2013 12:48 PM
    To: discussion_evolution@communities.telligent.com
    Subject: [Telligent Evolution Platform Discussion] Public Api Search Wildcard
     

    I'd like search to work with partial matches. It seems that I only get results if a search term matches an entire word of what I'm looking for.

    Here's what I'm trying to do:

    Use the public api "Search"  object to auto-complete a field which takes a "Group" name. So essentially I'm calling this line of code:

    Ext.SearchResults results = PublicApi.Search.List(options);

    with options.Query = [whatever the user types in] after 4 characters are typed into the field.

    I tried using * in the query but it still won't return partial matches. Is there something else I need to do? Or is there a different value for a wildcard?

    Any help would be appreciated.

    Regards,

    -Paul

  • In reply to Kevin Cunningham:

    Hi Paul,

    If you're interested, we wanted to give you some links to our documentation about the using search with filters from the UI, info about the dismax as Kevin mentioned, terms you can use for searching (e.g., tag:xxx, as he mentioned), and search stop words.

    This doc on using faceted search from the UI:  (including filters).

    This doc on supported search syntax

    This doc on supported search fields (e.g., tag:xxx)

    Search stop words (including conjunctions, prepositions, and conjugations of verb “be”)

    And there are also several development docs on creating your own search facets or your own search provider, etc. in the Developer 7.x documentation. Please let me know if you want help finding them.

    Jenny

  • In reply to Jenny Jarrard:

    Hi Jenny, I appreciate the reply, but I'm getting a "Group Not Found" when clicking on those links.

  • In reply to pfarina@hugeinc.com:

    Thank you. I'll look into it and report back. Sorry for the inconvenience.

  • In reply to Kevin Cunningham:

    Hi Kevin, this is perfect. The one thing I would add is that the search term also needs to be lower case in order for this work. For instance content:columb* returns columbia but content:Columb* returns nothing. But otherwise this is working as expected.. I

    I also forgot to mention I'm using Evolution 6.x for this task.

  • In reply to pfarina@hugeinc.com:

    OK, it appears the forum URLs were combined with the page URLs (my error). Please try these:

    Using Faceted Search

    Supported search syntax

    Search fields by type

    Search stop words

    Jenny

  • In reply to Jenny Jarrard:

    Thanks for all your help. I've run into one issue with the wildcard on a field search. It seems to stop matching after 15 characters. For instance if I search:

    title:aerospace divis*

    I get back Aerospace Division

    but if I search:

    title:aerospace divisi*

    I get nothing, and the same goes for any other titles when someone types in the 15th character it returns 0 results.

  • In reply to pfarina@hugeinc.com:

    I don't think it has anything to do with the number of characters, at least on the char count of the entire search term. I think it has more to do with stemming.

    i get the same results that you do after adding a blog post with a title of Aerospace Division. However if I add a blog post with a title of Mathematics Division I get the same results (but at different char counts than the shorter Aerospace Division).

    Ex:

    title:mathematics divis* = get Mathematics Division (17 chars works)

    title:mathematics divisi* = no results

    In fact if I only search for the term Division I still get the same results:

    title:d* ... or anything up to ... title:divis* will show me at least those 2 blog posts

    title:divisi* = no results

    And I don't think it has anything to do with the number of characters of the single term either. Division seems to stop working after 6 characters. But performing the same test with Aerospace works all the way to the last letter:

    title:a* ... or anything up to ... title:aerospac* will return at least the Aerospace Division blog post.

    The same thing happens to Mathematics as does to Division.

    title:m* ... and everything up to ... title:mathemat* will return at least the Mathematics Division blog post

    title:mathemati* = no results

  • In reply to Jenny Jarrard:

    Hi Jenny, In my code I am using Fieldfilter to search a list like the following and I want to know how to assign the the member value to search for results with member value of both 0 and 1

    FieldFilter memberFilter = new FieldFilter();

    memberFilter.FieldName = "profile_IsMember";

    memberFilter.FieldValue = member;

    options.FieldFilters.Add(memberFilter);

Related