How to Get Newest Relevant Results First

Hi Pinecone Team,

I’m building a template search system where we store templates in Pinecone using a single vector created from a list of tags. Here’s an example of such a tag list:


diwali,festival,lights,festivals,deepawali,deepavali,greetings,wish,wishes,card,greeting,design,celebration,dipawali,दीपावली,dewali,deewali,dipavali,दिवाळी,divali,dipawli,wishfully,festivel,featival,dipabali,fastivel,depavali,lighted

We use these tags to perform vector searches and successfully get relevant results based on similarity. However, we noticed that some of the most recent (newest) relevant templates are buried in the middle or end of the results list.

What we want:

We’d like to sort or prioritize the most relevant AND most recently updated templates at the top of the results. In other words, the newest relevant results should appear first.


:gear: Current Setup:

  • We embed tag vectors using text-embedding-3-large.

  • We use dot product for similarity.

  • Detail template information is stored in MySql.


:magnifying_glass_tilted_left: My Question:

Is there a way in Pinecone to get:

:white_check_mark: Most newest relevant results

If not directly possible, what’s the best practice to post-process Pinecone results to achieve this behavior efficiently?

Thanks in advance!

Hi @parthm.optimumbrew,

Unfortunately, Pinecone doesn’t have an ‘ORDER BY’ analog. So there’s not a built in way to get the most recent vectors first. But, there is a way you can approximate this.

What you would do is use a timestamp in the metadata of your vectors, ideally an epoch timestamp. This could be for when the vector is created, or when the original source document was created (or both! just use two fields in that case). Then, when searching, you could include a metadata filter that only returns vectors created within the last X days/hours/whatever. Your app could then sort the results by the vectors’ timestamps for ultimate return to the app or user.

Keep in mind that $gte and $lte filter terms can’t operate on date strings, like ‘28 April 2025’. This is why I suggest using epoch times, like 1745798400. Since those are ints they make it easier to filter.

1 Like