You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by maheshkumar <ma...@gmail.com> on 2010/08/27 11:41:55 UTC

Auto ID for Documents indexed

Is there feature to provide an auto-increment id to the document which is
getting indexed.
This is the schema file
<field name="reference" type="string" indexed="true" stored="true"
required="true"/> 
<field name="id" type="string" indexed="true" stored="true"/> 


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Auto-ID-for-Documents-indexed-tp1367972p1367972.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Auto ID for Documents indexed

Posted by Markus Jelsma <ma...@buyways.nl>.
No. Solr doesn't require a unique ID nor is an auto incrementing value really 
useful in indices spanning multiple machines. Maybe SOLR-308 could help you 
out but then the question remains, why would you need a feature like this?

https://issues.apache.org/jira/browse/SOLR-308



On Friday 27 August 2010 11:41:55 maheshkumar wrote:
> Is there feature to provide an auto-increment id to the document which is
> getting indexed.
> This is the schema file
> <field name="reference" type="string" indexed="true" stored="true"
> required="true"/>
> <field name="id" type="string" indexed="true" stored="true"/>
> 

Markus Jelsma - Technisch Architect - Buyways BV
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350


Re: Auto ID for Documents indexed

Posted by "Lucas F. A. Teixeira" <lu...@gmail.com>.
Oh, wait.

If you do not have to have sequential, but only unique keys, you can use the
UUIDType.
You can set SOLR to handle this and generate the field ids for you.

Works great for me.

[]s,

Lucas Frare Teixeira .ยท.
- lucastex@gmail.com
- lucastex.com.br
- blog.lucastex.com
- twitter.com/lucastex


On Fri, Aug 27, 2010 at 8:23 AM, Grijesh.singh <pi...@gmail.com>wrote:

>
> No there is no such feature,your indexing component have to keep generation
> of ids
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Auto-ID-for-Documents-indexed-tp1367972p1369051.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Auto ID for Documents indexed

Posted by "Grijesh.singh" <pi...@gmail.com>.
No there is no such feature,your indexing component have to keep generation
of ids
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Auto-ID-for-Documents-indexed-tp1367972p1369051.html
Sent from the Solr - User mailing list archive at Nabble.com.