bq. I don't know if the best approach is combine in index time or in query time
It Depends (tm). What is your goal? Let's say you have db_f1 and fm_f2 (db == from the database and fm = file data). If you want to form a Solr query like db_f1:something fm_f2:something_else you don't have much choice, you've got to do it at index time or your search time will be horrible. OTOH, if you want search, say, _only_ on the db_* data or _only_ on the file data and enrich the results returned to the user with data from the other source, that's perfectly reasonable, although you should really do some prototyping to see if it meets your SLA. This presupposes that you're only returning a few rows. For example, use Solr to get the top 10 docs based on file data and have your app layer reach out to the DB to enrich just those 10 docs. In general, you should always consider doing as much pre-processing at index time as you can on the theory that what you want is fast searches and you'll search over a doc many, many more times than you index it. Best, Erick On Tue, Jun 26, 2018 at 7:02 AM, Angel Addati <angeladd...@gmail.com> wrote: > Thank both. > > *"From your problem description, it looks like you want to gather the data > from the DB and filesystem and combine them into a Solr document at index > time, then index that document. " * > > Exactly. I don't know if the best approach is combine in index time or in > query time. But I need search and show results of the combine items. I'm > investigating the allias sugguest. Do you think it solve the problem or Do > you know other approach? > > PD: I need put the information in the file and the information in the data > base also, because it have some important content and metadata. > > Regards... > > * - - -* > *Angel** Adrián Addati* > > > 2018-06-26 10:50 GMT-03:00 Erick Erickson <erickerick...@gmail.com>: > >> From your problem description, it looks like you want to gather the >> data from the DB and filesystem and combine them into a Solr document >> at index time, then index that document. >> >> Put enough information in Solr to fetch the document as necessary, >> often people don't put the entire file in Solr especially if it's, >> say, a PDF or Word etc. >> >> Best, >> Erick >> >> On Tue, Jun 26, 2018 at 5:21 AM, Peter Gylling Jørgensen >> <peter.jorgen...@findwise.com> wrote: >> > Hi, >> > >> > I would create a search alias, that contains the latest versions of the >> different collections. >> > >> > See: >> > https://lucene.apache.org/solr/guide/7_3/collections- >> api.html#collections-api >> > >> > Then you use this alias to search for results >> > >> > You get better results if you define the same schema for all collections >> > >> > Best Regards >> > Peter Gylling Jørgensen >> > Findability Consultant >> > Mail: peter.jorgen...@findwise.com<mailto:peter.jorgen...@findwise.com> >> > Mobile: +45 42442890 >> > >> > >> > Den 26. jun. 2018 kl. 13.55 skrev angeladdati <angeladd...@gmail.com >> <mailto:angeladd...@gmail.com>>: >> > >> > Hi: >> > >> > I have two sources to indexing: >> > Database: MetadataDB1, MetadataDB2, File Url... >> > Files: MetadataF1, MetadataF2, File Url, Contain... >> > >> > I index the data base and the files. When I search, I need search and >> show >> > the merge result: Database + Files (MetadataDb1, MetadataDB2, MetadataF1, >> > MetadataF2, File Url, Contain, ...). >> > >> > >> > Is it possible? >> > >> > Regards! >> > >> > Angel >> > >> > >> > >> > -- >> > Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html >>