# Order text search by position of search criteria in string

**URL:** <https://discuss.elastic.co/t/order-text-search-by-position-of-search-criteria-in-string/22755>\
**Category:** Elasticsearch\
**Created:** [March 19, 2015, 8:51am UTC](https://discuss.elastic.co/t/order-text-search-by-position-of-search-criteria-in-string/22755 "2015-03-19T08:51:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brent\_Gracey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brent_gracey/32/823_2.png) [@Brent\_Gracey](https://discuss.elastic.co/u/Brent_Gracey)\
**Post date:** [March 19, 2015, 8:51am UTC](https://discuss.elastic.co/t/order-text-search-by-position-of-search-criteria-in-string/22755/1 "2015-03-19T08:51:39Z")

</div>

I'm looking to build a search across URLs that orders the results by urls  
that end in the search criteria.

For example; across the below 3 urls: z/a/b/c; a/z/b/c; a/b/c/z

searching for "z" - would result in a the order

a/b/c/z; a/z/b/c; z/a/b/c

searching for "a"

z/a/b/c; a/b/c/z; a/z/b/c

I'm wondering if elastic search - will be well suited to tackle this  
challenge?

Thanks,  
Brent

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d9777e0c-d28d-4e06-9754-6f4407bbd192%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d9777e0c-d28d-4e06-9754-6f4407bbd192%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:25am UTC](https://discuss.elastic.co/t/order-text-search-by-position-of-search-criteria-in-string/22755/2 "2017-07-06T00:25:40Z")

</div>


