news-ai / tabulae

API for media list management
https://tabulae.newsai.org/
0 stars 0 forks source link

/feeds/ endpoint with both twtr, headlines, etc. #205

Closed AbhiAgarwal closed 7 years ago

AbhiAgarwal commented 7 years ago

https://search.newsai.org/tweets,headlines/tweet,headline/_search?size=10000

AbhiAgarwal commented 7 years ago

not sure how to write dis query

{
    "query": {
        "bool": {
            "should": [{
                "match": {
                    "data.Username": "julie_panda"
                }
            }],
            "minimum_should_match": "0"
        }
    },
    "size": 20,
    "from": 0,
    "min_score": 0,
    "sort": [{
        "data.CreatedAt": {
            "order": "desc",
            "mode": "avg"
        }
    }]
}
AbhiAgarwal commented 7 years ago

https://github.com/elastic/elasticsearch/issues/10107

AbhiAgarwal commented 7 years ago

no clue how to properly filter 2 queries well

maybe have a /feeds/feed endpoint on es instead dunno

AbhiAgarwal commented 7 years ago

http://elasticsearch.qiniudn.com/guide/en/elasticsearch/guide/current/multi-index-multi-type.html

some chinese qiniudn dude has a offline guide?

AbhiAgarwal commented 7 years ago

don't want to remove twtr or headlines. maybe a /feeds/ that's a little stripped down of details? duno

AbhiAgarwal commented 7 years ago

last approach is to just load the data from both and then sort through it in a more intelligent way

AbhiAgarwal commented 7 years ago

have a /feeds/feed with

{

es id feed url twtr url

}