KnowWhereGraph / kwg-faceted-search

Knowledge Explorer: The search interface to KnowWhereGraph
http://stko-kwg.geog.ucsb.edu
3 stars 0 forks source link

Total result query #43

Closed seilagonzalez closed 2 years ago

seilagonzalez commented 2 years ago

create a template query that it calculates the total result for a particular kword with some facets.

3 queries templates: one for places, one for hazards, one for people.

  1. start with query with an empty string. For instance, find out how to get all places within an empty keyword.
  2. add getting results for a specific keyword.
  3. add getting counters for selection on places facets.
  4. selection of any hazard: for now we have earthquakes and fires.

Look at this #29 issue for how are going to be the facets.

Let me know if you have questions. Counter should recalculate on the fly. Take a look to enslaved to see how it does this behavior.

https://enslaved.org/search/all?searchbar=&limit=20&offset=0&sort_field=label.sort&display=people

Code for enslaved can be found here: https://github.com/matrix-msu/Enslaved-Hub. Search code can be found in function folder.

seilagonzalez commented 2 years ago

I also I've been exploring the use of the elasticsearch for the graphh https://github.com/KnowWhereGraph/kwg-faceted-search/issues/41

You need to change the configuration so you are pulling information about stko-kwg and not stko-roy.

zilongliu-geo commented 2 years ago

Yes. The configuration has changed. You can refer to query.js in my branch: https://github.com/KnowWhereGraph/kwg-faceted-search/blob/zilong/dr-app/public/js/query.js

amoeba commented 2 years ago

I didn't get to this last week like I thought I would have but did take some time on Friday to learn how AngularJS does things and scan over the code.

@zilongliu-geo: I'm going to want the count queries to be based on the query that returns the individual results. Does your zilong branch have the latest versions of those or should I be working off what's on the main branch?

zilongliu-geo commented 2 years ago

@amoeba Sorry I just saw your message. Yes, my branch has the latest version of queries to retrieve hazard records (based on their relations with selected places/place types). But I still think you can open a new branch?

amoeba commented 2 years ago

No worries, @zilongliu-geo, and thanks. I'll work in my own branch for sure but wanted to make sure I was basing mine off the right work.

seilagonzalez commented 2 years ago

@amoeba is doing more operation stuff, closing this issue.