Hello, I will use DynamicField for some fields but some other fields need to be created. this is an exemple:
*Informations* *unique ID field* *Type* *indexed* *stored* *multivalued* *sortmissinglast* *required* *Iddocument* True long false True False True True so how to add this field? by default the "id" is indexed and its type is "string" any idea how i can do that without changing manually the shema.xml? thanks, Best regards, Anass BENJELLOUN 2014-06-19 9:28 GMT+02:00 Alexandre Rafalovitch [via Lucene] < ml-node+s472066n4142771...@n3.nabble.com>: > Use dynamic fields definitions perhaps? Just suffix the fields with > "_s", "_i", etc. As per schema.xml. > > You could also use new schemaless mode, but then when they send a > value that auto-creates a field of wrong type, it would be really hard > to troubleshoot. > > Regards, > Alex. > Personal website: http://www.outerthoughts.com/ > Current project: http://www.solr-start.com/ - Accelerating your Solr > proficiency > > > On Thu, Jun 19, 2014 at 2:07 PM, benjelloun <[hidden email] > <http://user/SendEmail.jtp?type=node&node=4142771&i=0>> wrote: > > > Hello, > > > > Because i will not stay working with the actual entreprise. > > then no one know how to change it manually if they need to add new > fields > > in the futur. > > so i need to do this with java code, can you please help me with an > exemple > > to complete this: > > > >>public static void addNewField(Boolean uniqueId,String type, Boolean > >> indexed,Boolean stored,Boolean multivalued,Boolean > >> sortmissinglast,Boolean required){ > >> > >> ......................................... > >> ......................................... > >> } > > > > thanks, > > Best regards, > > Anass BENJELLOUN > > > > > > > > 2014-06-18 18:21 GMT+02:00 Walter Underwood [via Lucene] < > > [hidden email] <http://user/SendEmail.jtp?type=node&node=4142771&i=1>>: > > > >> Why can't you change schema.xml? --wunder > >> > >> On Jun 18, 2014, at 8:56 AM, benjelloun <[hidden email] > >> <http://user/SendEmail.jtp?type=node&node=4142571&i=0>> wrote: > >> > >> > Hello, > >> > > >> > this is what i want to do: > >> > > >> > public static void addNewField(Boolean uniqueId,String type, Boolean > >> > indexed,Boolean stored,Boolean multivalued,Boolean > >> > sortmissinglast,Boolean required){ > >> > > >> > ......................................... > >> > ......................................... > >> > } > >> > > >> > any exemple please, > >> > thanks, > >> > Best regards, > >> > Anass BENJELLOUN > >> > > >> > > >> > > >> > > >> > >> > >> > >> ------------------------------ > >> If you reply to this email, your message will be added to the > discussion > >> below: > >> > >> > http://lucene.472066.n3.nabble.com/add-new-Fields-with-SolrJ-without-changing-schema-xml-tp4142515p4142571.html > >> To unsubscribe from add new Fields with SolrJ without changing > >> schema.xml, click here > >> < > > >> . > >> NAML > >> < > http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > >> > > > > > > > > > > -- > > View this message in context: > http://lucene.472066.n3.nabble.com/add-new-Fields-with-SolrJ-without-changing-schema-xml-tp4142515p4142769.html > > > Sent from the Solr - User mailing list archive at Nabble.com. > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://lucene.472066.n3.nabble.com/add-new-Fields-with-SolrJ-without-changing-schema-xml-tp4142515p4142771.html > To unsubscribe from add new Fields with SolrJ without changing > schema.xml, click here > <http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4142515&code=YW5hc3MuYm5qQGdtYWlsLmNvbXw0MTQyNTE1fC0xMDQyNjMzMDgx> > . > NAML > <http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://lucene.472066.n3.nabble.com/add-new-Fields-with-SolrJ-without-changing-schema-xml-tp4142515p4142777.html Sent from the Solr - User mailing list archive at Nabble.com.