Question

We have identified Apache Solr as a possible solution to our problem. Please bear with me, I'm new to Apache Solr. We are planning to upload several large CVS files and use Solrs REST like feature to get the result back in XML/JSON.

The problem I am thinking of is e.g. you have two file currency.csv and country.csv and they both have a 'GBP' as the currency entry in them. So if you upload these both files into Solr and do a query for value of 'GBP' then form which file entries will this have been returned?

What I would ideally like to do is a query that would only return currency e.g. 'GBP' form entries that were upload from the currency.csv and not from the country.csv file.

Hope someone can help or point me in the right direction as we may have files with similar data and yet we need to be sure to retrieve the right values from the right csv file.

Thanks in advance. GM

UPDATE

Is it better to have multiple cores? i.e. one core per file?

Was it helpful?

Solution

You can add an additional field data_type which would indicate the type like country or currency for the records.
You can then use the field to filter the results by the type or be able to display and use the type to indicate which type the record belongs to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top