Comments (11)
https://github.com/UW-COSMOS/Cosmos/blob/master/cosmos/birdnest_backend/birdnest_backend/app.py#L268
Looks like it does a "match" as opposed to a "match phrase" (which is what we use in the xDD API). So multiple words are treated as an OR.
from cosmos.
That's what I thought. We should probably try to incorporate a switch for how multiple terms are handled in ES, which requires both front end and back end work. The first step is to distinguish multiple terms from a search phrase. Comma-separation would probably be best. Want to coordinate with @davenquinn about this @iross?
from cosmos.
If we default to "and" (match phrase I guess) and split the search string on commas to generate "or" relationships, could this be done without involving the frontend?
from cosmos.
from cosmos.
Exactly as stated.
- multiple terms no commas is a phrase
- multiple terms, comma separated: default to inclusive "and", optional "or" would be good
Edit: @iross this search is not over the document, it is over individual cosmos table, figure, equation elements.
from cosmos.
OK, so we would need an and/or switch in the API and frontend.
from cosmos.
Logic has been updated in the live instance. on the search_es_objects
endpoint:
- Search now uses
match_phrase
by default, so multiple terms with no commas is searched as a full phrase - Comma-separated lists are treated as separate terms, defaulting to and
&search_logic=any
will switch comma-separated term lists to use OR logic.
Keeping this open until I propagate the changes back into master.
from cosmos.
See this issue for possible lingering problem:
UW-COSMOS/cosmos-visualizer#48
from cosmos.
Added search_logic
to frontend in COSMOS/cosmos-visualizer#4e81d1d.
from cosmos.
@iross are the changes in master for AND/OR logic?
from cosmos.
Merged in ages ago. Closing.
from cosmos.
Related Issues (20)
- Leverage in-text table mentions to expand context recall HOT 4
- ASKE-ID as a parameter on ES retrieval API HOT 1
- Add SPECTER model functionality
- context enrichment should gracefully handle tableless documents
- replace os.path with pathlib.Path HOT 2
- The parquet files not found in output directory HOT 3
- Document naming question HOT 2
- Worker question HOT 2
- Elasticsearch virtual memory error HOT 4
- PIL Image size limits HOT 2
- NVIDIA driver HOT 4
- SSL certificate expired
- Wrong exception catch when extracted tables don't exist HOT 1
- Allow one, both, or neither extractions HOT 1
- Recognize, capture, and correct underlying PDF parsing issues HOT 1
- Parquet Files not found in Output HOT 1
- XGBoost Error HOT 3
- Timeout after 10 seconds? HOT 1
- Column text mixing in output
- Expecting `.png` but receiving `.jpg` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmos.