Forum Discussion

dhpawar's avatar
dhpawar
Helper
12 years ago

Different result for search string

 Hi

 

When I am trying to search keyword through browser using rest call getting different message. URL:  community.ebay.com/restapi/vc/search/messages?restapi.format_detail=full_list_element&q=with+probl&page_size=5&solved=true&solutions=true&restapi.response_style=-types&restapi.response_style=view

 

And when I am searching same keyword through actual  http://community.ebay.com/ site getting different result. Please find attachment for it.

 

Search string = with probl

 

Can you please help me on it? Thanks

 

Regards,

Dharmendra


solvedQuestion.png

1 Reply

  • YuriK's avatar
    YuriK
    Khoros Expert
    12 years ago

    Hey Dharmendra,

     

    The search API gives you a lot more control over the search process. It allows you to enter a query with lucene query syntax (more on lucene query syntax here), create different types of queries (one_or_more, phrase, search), and control sorting. This makes it difficult to identically recreate what you see in the Ask A Question widget. See more details about how to use search here.

     

    Here are a few suggestions to get closer to what you want:

     

    1) instead of q use one_or_more or use fuzzy/wildcard search (with probl* or with probl~)

    2) set the date range you want to search on (using "date:[<start date> TO <end date>]" using Unix timestamps inside q)

    3) set the sorting you want using sort_by argument

     

    Hope this helps,

     

    Yuri