Conditional field values in DataImport

2011-07-26 Thread solruser@9913
This may be a trivial question - I am noob :).
In the dataimport of a CSV file, am trying to assign a field based on a
conditional check on another field.

E.g. 
   
  
   this works well.  However I need to create another field A that is
assigned a value based on X.  

   Something like this
 If X contains "abc" then A="complex-action" else A="SimpleAction"

  

I can do all the way upto writing the second regex for checking the value
inside X - however i am not sure how to assign the conditional value to A
based on a match or fail

Any help is much appreciated.

-g

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Conditional-field-values-in-DataImport-tp3202136p3202136.html
Sent from the Solr - User mailing list archive at Nabble.com.


Data Import Handler Architecture Diagram

2011-07-27 Thread solruser@9913
Maybe I am looking at the wrong version - the diagram (and the screenshot in
the interactive dev mode section)  don't show up in the WIKI page.  

http://wiki.apache.org/solr/DataImportHandler#Architecture

Is this a wrong link?

I did an inspect element and this is what I see ...

/solr/DataImportHandler?action=AttachFile&do=get&target=DataImportHandlerOverview.png
 

-g

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Data-Import-Handler-Architecture-Diagram-tp3204459p3204459.html
Sent from the Solr - User mailing list archive at Nabble.com.


Data Import Handler Diagram

2011-07-27 Thread solruser@9913
Maybe I am looking at the wrong version - the diagram (and the screenshot in
the interactive dev mode section)  don't show up in the WIKI page.   

http://wiki.apache.org/solr/DataImportHandler#Architecture

Is this a wrong link? 

I did an inspect element and this is what I see ... 

 ... img alt="DataImportHandlerOverview.png" class="attachment"
src="/solr/DataImportHandler?action=AttachFile&do=get&target=DataImportHandlerOverview.png"
title="DataImportHandlerOverview.png" 

-g

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Data-Import-Handler-Diagram-tp3204470p3204470.html
Sent from the Solr - User mailing list archive at Nabble.com.


Store complete XML record (DIH & XPathEntityProcessor)

2011-07-27 Thread solruser@9913
I am trying to use DIH to import an XML based file with multiple XML records
in it.  Each record corresponds to one document in Lucene.  I am using the
DIH FileListEntityProcessor (to get file list) followed by the
XPathEntityProcessor to create the entities.  

It works perfectly and I am able to map XML elements to fields . however
I also need to store the entire XML record as separate 'full text' field. 
Is there any way the XPathEntityProcessor provides a variable like 'rawLine'
or 'plainText' that I can map to a field.  

I tried to use the Plain Text processor after this  - but that does not
recognize the XML boundaries and just gives the whole XML file.


   
 
 
and so on ...
This works perfectly.  However I also need something like ...



Any help is much appreciated. I am a newbie and may be missing something
obvious here

-g



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Store-complete-XML-record-DIH-XPathEntityProcessor-tp3205524p3205524.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Store complete XML record (DIH & XPathEntityProcessor)

2011-07-28 Thread solruser@9913
Thanks Chantal
I am ok with the second call and I already tried using that.  Unfortunatly
It reads the whole file into a field.  My file is as below example
 
   
  ... 
  
  
   
  ... 
  
 

  ... 
  



Now the XPATH does the 'for each /record' part.  For each record I also need
to store the raw log in there.  If I use the  PlainTextEntityProcessor then
it gives me the whole file (from  ..  ) and not each of the
 

Am I using the PlainTextEntityProcessor wrong?

THanks
g


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Store-complete-XML-record-DIH-XPathEntityProcessor-tp3205524p3207203.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr DIH import - Date Question

2011-08-04 Thread solruser@9913
This is perhaps a 'truly newbie' question.  I am processing some files via
DIH handler/XPATH Processor.  Some of the date fields in the XML are in
'Java Long format' i.e. just a big long number.  I am wondering how to map
them Solr Date field.  I used the DIH  DateFormatTransformer for some other
'date' fields that were written out in a regular date format.

However I am stumped on this - thought it would be simple but I was not able
to find a solution 

Any help would be much appreciated

-g

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-DIH-import-Date-Question-tp3227720p3227720.html
Sent from the Solr - User mailing list archive at Nabble.com.