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 edvicif <ed...@gmail.com> on 2012/09/07 17:14:12 UTC
Indexing CSV files with filenames
Hi!
I've have a set of CSV files. I wanted to index them by certain columns. But
I also want to store the filename, where they got indexed from.
The reason is, that the queries I want to run is to identify files.
David
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-CSV-files-with-filenames-tp4006165.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing CSV files with filenames
Posted by edvicif <ed...@gmail.com>.
My problem is more like the left hand side of the equatation.
Is it ${f.name} or something?
On Sep 7, 2012 5:36 PM, "Rafał Kuć-3 [via Lucene]" <
ml-node+s472066n4006179h93@n3.nabble.com> wrote:
> Hello!
>
> You can just pass the name of the file to the 'literal' parameter. For
> example adding
>
> literal.filename=my_file.csv
>
> would set the 'filename' field of your document with the value of
> 'my_file.csv'.
>
> --
> Regards,
> Rafał Kuć
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
> ElasticSearch
>
> > Thx for the quick answer.
>
> > Can you help a little more? I don't really got the concept of literal.
>
> > How can I set a field with the source absolute path?
>
> > I mean how can I find out the parameter names?
>
> > An example will be really help full.
>
>
>
> > --
> > View this message in context:
> >
> http://lucene.472066.n3.nabble.com/Indexing-CSV-files-with-filenames-tp4006165p4006177.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/Indexing-CSV-files-with-filenames-tp4006165p4006179.html
> To unsubscribe from Indexing CSV files with filenames, click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4006165&code=ZWR2aWNpZkBnbWFpbC5jb218NDAwNjE2NXwtMTk5Mjg2MTM3OQ==>
> .
> 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/Indexing-CSV-files-with-filenames-tp4006165p4006194.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing CSV files with filenames
Posted by sophia250 <so...@gmail.com>.
how did you find the file name? When i do posting, i use wildcard *.csv. Your
way seems work only when you are posting by each
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Indexing CSV files with filenames
Posted by Rafał Kuć <r....@solr.pl>.
Hello!
You can just pass the name of the file to the 'literal' parameter. For
example adding
literal.filename=my_file.csv
would set the 'filename' field of your document with the value of
'my_file.csv'.
--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch
> Thx for the quick answer.
> Can you help a little more? I don't really got the concept of literal.
> How can I set a field with the source absolute path?
> I mean how can I find out the parameter names?
> An example will be really help full.
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Indexing-CSV-files-with-filenames-tp4006165p4006177.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing CSV files with filenames
Posted by edvicif <ed...@gmail.com>.
Thx for the quick answer.
Can you help a little more? I don't really got the concept of literal.
How can I set a field with the source absolute path?
I mean how can I find out the parameter names?
An example will be really help full.
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-CSV-files-with-filenames-tp4006165p4006177.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing CSV files with filenames
Posted by Rafał Kuć <r....@solr.pl>.
Hello!
In Solr 4.0 you will have the ability to add arbitrary field along
with all documents from a single file - http://wiki.apache.org/solr/UpdateCSV#literal
--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch
> Hi!
> I've have a set of CSV files. I wanted to index them by certain columns. But
> I also want to store the filename, where they got indexed from.
> The reason is, that the queries I want to run is to identify files.
> David
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Indexing-CSV-files-with-filenames-tp4006165.html
> Sent from the Solr - User mailing list archive at Nabble.com.