Thanks for your answer Alexandre! S.
Silvia Suárez Barón I+D+I <http://www.anpro21.com/> 972 989 470 / s...@anpro21.com / <http://www.anpro21.com/twitter> <http://www.anpro21.com/facebook> <http://www.linkedin.com/pub/silvia-a-su%C3%A1rez-bar%C3%B3n-phd/10/b30/26a> <http://blog.anpro21.com/> *Tecnologías y SaaS para el análisis de marcas comerciales.* Nota: Usted ha recibido este mensaje al estar en la libreta de direcciones del remitente, en los archivos de la empresa o mediante el sistema de "responder" al ser usted la persona que contactó por este medio con el remitente. En caso de no querer recibir ningún email mas del remitente o de cualquier miembro de la organización a la que pertenece, por favor, responda a este email solicitando la baja de su dirección en nuestros archivos. Advertencia legal: Este mensaje y, en su caso, los ficheros anexos son confidenciales, especialmente en lo que respecta a los datos personales, y se dirigen exclusivamente al destinatario referenciado. Si usted no lo es y lo ha recibido por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique por este medio y proceda a destruirlo o borrarlo, y que en todo caso se abstenga de utilizar, reproducir, alterar, archivar o comunicar a terceros el presente mensaje y ficheros anexos, todo ello bajo pena de incurrir en responsabilidades legales. 2014-03-28 14:14 GMT+01:00 Alexandre Rafalovitch <arafa...@gmail.com>: > Grep for uuid in config directory. It's probably in solrconfig.xml > especially if you have dedup chain. > > Regards, > Alex > On 28/03/2014 7:52 pm, "Silvia Suárez" <s...@anpro21.com> wrote: > > > Dear all: > > > > I'm trying to add a solr document into the solr collection. The code > that I > > am using is like this: > > > > public static void addDocuments (HttpSolrServer serverCore2) > > throws SolrServerException, IOException { > > SolrInputDocument doc1 = new SolrInputDocument(); > > doc1.addField( "c_noticia", "id1", 1.0f ); > > doc1.addField( "c_tipo", 1, 1.0f ); > > doc1.addField( "c_perfil", 10 ); > > serverCore2.add( doc1 ); > > serverCore2.commit(); > > > > } > > > > However, I get next error when i execute my program: > > > > Exception in thread "main" > > org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: > > Document is missing mandatory uniqueKey field: uuid at > > > > > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:402) > > at > > > > > org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180) > > at > > > > > org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:117) > > at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116) at > > org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102) at > > SearchLucene.addDocuments(SearchLucene.java:1047) at > > SearchLucene.printOr(SearchLucene.java:1030) at > > SearchLucene.SearchLuciernaga(SearchLucene.java:437) at > > GetResults.main(GetResults.java:482) > > > > > > My schema.xml file is like this: > > > > <field name="c_noticia" type="string" indexed="true" stored="true" > > required > > ="true" multiValued="false" /> <field name="c_tipo" type="int" indexed= > > "true" stored="true" multiValued="true"/> <field name="c_perfil" > type="int" > > indexed="true" stored="true" multiValued="true"/> > > > > And the uniqueKey is like this: > > > > <uniqueKey>c_noticia</uniqueKey> > > > > > > I don't understand what is the problem here. > > > > My uniqueKey is: c_noticia, it is not a uuid field. > > > > > > Thanks a lot for some help in advance, > > > > Silvia. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2014-03-28 11:47 GMT+01:00 Alan Woodward <a...@flax.co.uk>: > > > > > Hi all, > > > > > > I have a few of questions about the context-aware > > AnalyzingInfixSuggester: > > > - is it possible to choose a specific field for the context at runtime > > > (say, I want to limit suggestions by a field that I've already faceted > > on), > > > or is it limited to the hardcoded CONTEXTS_FIELD_NAME? > > > - is the context-aware functionality exposed to Solr yet? > > > - how difficult would it be to add similar functionality to the other > > > suggesters, if say I only wanted to do prefix matching? > > > > > > Thanks, > > > > > > Alan Woodward > > > www.flax.co.uk > > > > > > > > > > > >