Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Nov 24, 2012 Nov 24, 2012

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.    

  

1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 26, 2012 Nov 26, 2012
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources