gocommerce icon indicating copy to clipboard operation
gocommerce copied to clipboard

Add additional searching capabilities to orders api

Open RoseannaM opened this issue 5 years ago • 4 comments

- Do you want to request a feature or report a bug? Feature

- What is the current behavior? We can currently search orders by item and email

- What is the expected behavior? To search all order fields:

  • ID
  • Date
  • Type
  • Subtotal
  • Taxes
  • Total
  • Customer name
  • Billing status
  • Billing address
  • Billing country
  • Billing company
  • VAT ID
  • Shipping status
  • Shipping address
  • Shipping country
  • Shipping company

image

RoseannaM avatar Oct 17 '18 05:10 RoseannaM

In which ways does this issue differ from #137? (How do we distinguish filtering from searching?)

We should probably merge the filtering and searching stuff into one issue to make sure all the fields we need can be filtered, right?

This issue does not say anything about searching multiple fields at the same time, so that's out of the scope?

mraerino avatar Oct 17 '18 08:10 mraerino

As a user I would expect search to perform full text search on the entire record.

This means if a user searched for "red blue black" any record that has any of those terms should be returned, and they should be sorted by number of search term hits.

RoseannaM avatar Oct 17 '18 17:10 RoseannaM

I see. When talking with Bret I thought we agreed that the SQL database is unsuited for full record searches. Something like Algolia or ElasticSearch comes to mind in that case.

Also, why did you include Shipping status and Billing status in the list of fields? Is it desirable to be able to search for "shipped" and then get records based on their status? This should be a use case for the regular filtering capabilities, shouldn't it?

mraerino avatar Oct 18 '18 15:10 mraerino

Since we really aught to go down the generalized search provider route at some point, we are going to hold off on this end of things until we research that some more. For now, I can selectively add fields as needed to the API. Down the road @mraerino can help us add a search provider api for algolia or elastic serach.

So... current status of this issue is that its on hold.

bcomnes avatar Oct 22 '18 16:10 bcomnes