Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add faceted search as an option #238

Closed
almasaeed2010 opened this issue Feb 18, 2019 · 3 comments
Closed

Add faceted search as an option #238

almasaeed2010 opened this issue Feb 18, 2019 · 3 comments
Assignees

Comments

@almasaeed2010
Copy link
Contributor

There are multiple issues to attack here.

  1. What should the data structure for the index look like (this is the main issue)
  2. Should we create a new index for this? If we don't, the new code will be a breaking change.
  3. Do we need a new form in an advanced search page? Or do we add this to the main search bar? Maybe a mix of both using some js to expand instead of redirecting to a different form?
@almasaeed2010
Copy link
Contributor Author

almasaeed2010 commented Feb 18, 2019

Ok we can index the data using the object mapping type. Here are a few things that need to get done:

  • Allow types of indices to be dynamic. That is, remove all mapping type options from the create index function.
  • Create a new cache of bundles and fields for each bundle. Since each field, by default, uses cv terms to declare its name, we don't need to worry about what other sites have named it if we use the machine name for the field.
  • Remove the default search field from the query generator. This guarantees that the old data structure remains searchable.
  • Flatten the data into a simple field => [data1, data2] structure. There is no need to complicate the index with nested properties sine that would be a horrible way to represent the search form to the user and it would add an extra level of unneeded complexity.
  • Create a new class ESQuery that simplifies the process of applying faceted search.

@almasaeed2010
Copy link
Contributor Author

Creating the ESQuery class is leading to refactoring the majority of the ESInstance class. I think this is a good opportunity to add unit tests for all of the classes.

  • Create a base TestCase class that has common initialization methods such as index seeding and query assertions
  • Test all of ESInstance, ESQuery, ESQueue, and ESJob.

@almasaeed2010
Copy link
Contributor Author

Follow up in PR #242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant