Skip to main content
Participant
Nov 24, 2012 12:45 PM UTC
Question

How to get maximum value of a field from an Indexed file in solr

I have indexed an XML file in solr, which  looks like:

<doc>
<str name="body">ABC</str>
<str name="contentid">282307</str>
<str name="docuid">121422</str>
</doc>
<doc>
<str name="body">MNO</str>
<str name="contentid">272307</str>
<str name="docuid">188422</str>
</doc>

this file has around 100000 documents. what is the way to get maximum value from the field value "contentid" parsing the whole file.    

  

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Nov 26, 2012 5:56 PM UTC

    Are you needing the ID so you know what the next contentid should be when assigned?

    Translate