I guess I should have said instead, can I store it in sorted order? From what I've been told the answer is no, so I'm not sure what other solution I can take here other than more nodes.
On Wed, Mar 19, 2014 at 5:02 PM, Georgi Ivanov <[email protected]>wrote: > I think sorting first, will be bad if u have more data. > Sorting is not exaclty the fasted thinkg .. > It may sound good for small amount of data, but what if we have 10 B > documents ? Should ES go trought all documents just to sort them ? > > I don't think this will be good. > > > On Wednesday, March 19, 2014 12:45:43 PM UTC+1, David Pfeffer wrote: >> >> I have an index that contains 30 GB worth of news stories. I want to >> return the stories that contain a particular name in their text, sorted >> chronologically. I only want the first 100 stories. >> >> ElasticSearch seems to approach this problem by filtering every story to >> just those that match, then sorting those results and returning the top >> 100. This uses a reasonably large amount of resources to filter every >> single one. >> >> Can I get ElasticSearch to instead sort first, and then filter in order >> until it reaches the maximum (100). Granted that this would be 100 per >> shard, but then the final step would be to take each shard's 100, sort them >> all together, and take the top 100 of that result set. This should, at >> least in my mind, use significantly less resources, as it would only need >> to go through maybe 5000 or 10000 items to find a match, as opposed to the >> entirety of the index. >> >> *(Cross-posted >> from >> http://stackoverflow.com/questions/22467585/sort-before-filters-in-elasticsearch >> <http://stackoverflow.com/questions/22467585/sort-before-filters-in-elasticsearch>, >> because I didn't get an answer there for 2 days.)* >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "elasticsearch" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/elasticsearch/TsKKCT8HVxE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/710176fc-2b8a-4046-b27a-7e25457f026c%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/710176fc-2b8a-4046-b27a-7e25457f026c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAP9-dnW-mu%2BS1zZWC85fYtgtfWULquskKbMGRdPAV3r0HXa1rQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
