creating new fields at index time - is it possible?
Hi guys!! I have started studying Solr, and I was wondering if anyone would be so kind as to help me understand a couple of things. I have XML data that looks like this: ID-0 Cheap hotels in Paris? I want to search the data based on a location hierarchy, so I must modify the XML data to obtain something like this: ID-0 Paris France Europe Cheap hotels in Paris? I intend to create a plugin to do this using Geonames data (I will use Geonames hierarchy and resource codes, not "Paris", "city", etc...) at index time. I will have to parse the text in the "post" field, check for each word a database (or XML files) to see if they are names of places, obtain the elements of the hierarchy, and place them in each field. My questions: 1) am I forcing Solr to do things it wasn't made for? would it be better to process the XML data BEFORE feeding it to Solr? 2) could you suggest a function I could modify? I was considering rewriting copyField; 3) if I rewrite an analyzer to create these fields, is there any way to display the output? (the tokens) Thanks in advance!!! Kir4. =) -- View this message in context: http://www.nabble.com/creating-new-fields-at-index-time---is-it-possible--tp23741267p23741267.html Sent from the Solr - User mailing list archive at Nabble.com.
using UpdateRequestProcessor from a custom analyzer
Is it possible to create a custom analyzer (index time) that uses UpdateRequestProcessor to add new fields to posts, based on the tokens generated by the other analyzers that have been run (before my custom analyzer)? The content of said fields must differ from post to post based on the tokens extracted from each one of them. Thank you very much for any answer/suggestion you can give me!!! G. -- View this message in context: http://www.nabble.com/using-UpdateRequestProcessor-from-a-custom-analyzer-tp23880160p23880160.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: creating new fields at index time - is it possible?
Now that I plan on adding new fields based on the data already present, it would be best to read the existing field after it has been processed (cleaned up) by the other analyzers. I was therefore planning on creating a custom analyzer that is started after the other default ones have been run; said analyzer would read the field and add new ones based on several rules and some data. I have been told that UpdateRequestProcessor probably cannot be invoked from an analyzer. Is there any way for an analyzer to add new fields? It would be enough to just populate them: I could add empty fields to the original document, and define for them analyzers that read the data of other fields previously analyzed and populate the empty field. Thanks to anyone that may have answers to my questions. =) Best regards, G. Noble Paul നോബിള് नोब्ळ्-2 wrote: > > > If you wish to plugin your code try this > http://wiki.apache.org/solr/UpdateRequestProcessor > > -- View this message in context: http://www.nabble.com/creating-new-fields-at-index-time---is-it-possible--tp23741267p23916728.html Sent from the Solr - User mailing list archive at Nabble.com.