redpanda-lineage icon indicating copy to clipboard operation
redpanda-lineage copied to clipboard

Additional parsing strategies and queries to support

Open wwoast opened this issue 5 years ago • 3 comments

Now that v1 of the parser is completed, and has been evolved on just slightly, I wanted to list out any remaining types of queries that redpandafinder should ideally support:

  • Two+ panda subjects (mochi matsuba): find photos containing both pandas, and then photos containing the individuals. Describe if the animals are related or not.
  • Two+ zoo subjects (japan uk): find all animals that have lived at both zoos at some point. This will require parsing out something as a location potentially.
  • Zeroary keyword and subject filter (babies japan): Run the search for just the keyword, and then filter by the additional subject.
  • Multiple keyword-subject pairs (born 2000 died 2016): Intersect the two searches
  • Parent/sibling/children/litter counts. Combinations of this kind of search would assist in fixing layout bugs for the panda family lists.
  • More difficult parse ideas TBD

It may be helpful if the panda.js search functions begin returning both search results, and the graph callbacks that build those results. Any search strategy that is a filter or intersection of facets for a graph node, is more easily expressed not by set combinations, but by taking the current graph callback and adding methods to it before obtaining the results with .run(). Union searches will likely be easier just by combining of the search results of multiple graph .run()s.

wwoast avatar Oct 21 '19 12:10 wwoast

Now that the birthdays content on the landing page is truncated, I should make birthday searches too, for things like today, yesterday, and non-ambiguous combinations of YYYY/MM, YYYY/MM/DD, and MM/DD.

wwoast avatar Jun 20 '21 15:06 wwoast

We have YYYY/MM/DD search now: https://github.com/wwoast/redpanda-lineage/commit/074356b2b880bd3d4e1fc2f9e78ea736ce5c027e

Adding date locales for my existing languages should make the rest fall into place, though I'll need to add a couple more date formats that are language-specific for good measure.

wwoast avatar Oct 12 '21 18:10 wwoast

Now MM/YYYY and MM/DD support is there too, with disambiguation based on language-specific date formats. https://github.com/wwoast/redpanda-lineage/commit/5f7014b7b7264fa3a0f9fc18fe40ab3b8c99820a I still could use some extra regexes for common CJK and Nepali date formats, but that shouldn't be too much extra work.

wwoast avatar Oct 14 '21 04:10 wwoast