Priorities on fields
Hi, Is it possible to define priorities on fields? Lets say I have a product table which has the following fields: - id - title - description - code_name An entry could be like this: id: 42 title: shinny new shoes description: Shinny new shoes made in Italy code_name: shinny-new-shoes-42-2013 Now, I would like to priorities the fields for the search hint. I would like to do as follow: id: 0.0 title: 0.8 description: 0.5 code_name: 0.1 Is it possible in SOLR 3.6.1? Dariusz
Re: Multicore configuration
Hi Bruno, Maybe this helps. I wrote something about it: http://www.coderthing.com/solr-with-multicore-and-database-hook-part-1/ Dariusz On Tue, Jan 15, 2013 at 9:52 AM, Bruno Dusausoy bdusau...@yp5.be wrote: Hi, I'd like to use two separate indexes (Solr 3.6.1). I've read several wiki pages and looked at the multicore example bundled with the distribution but it seems I missing something. I have this hierarchy : solr-home/ | -- conf | -- solr.xml -- solrconfig.xml (if I don't put it, solr complains) -- schema.xml (idem) -- ... | -- cores | -- dossier | -- conf | -- dataconfig.xml -- schema.xml -- solrconfig.xml | -- data | -- procedure | -- conf | -- dataconfig.xml -- schema.xml -- solrconfig.xml | -- data Here's the content of my solr.xml file : http://paste.debian.net/**224818/ http://paste.debian.net/224818/ And I launch my servlet container with -Dsolr.solr.home=my-directory/** solr-home. I've put nearly nothing in my solr-home/conf/schema.xml so Solr complains, but that's not the point. When I go to the admin of core dossier, http://localhost:8080/solr/**dossier/adminhttp://localhost:8080/solr/dossier/admin, the container says it doesn't exist. But when I go to http://localhost:8080/solr/**adminhttp://localhost:8080/solr/adminit finds it, which makes me guess that Solr is stil in single core mode. What am I missing ? Regards. -- Bruno Dusausoy Software Engineer YP5 Software -- Pensez environnement : limitez l'impression de ce mail. Please don't print this e-mail unless you really need to.
Re: Index data from multiple tables into Solr
Hi! I know the pain! ;) That's why I wrote a bit on a blog, so I could remember in the future. Here is the link in case you would like to read a tutorial how to setup SOLR w/ multicore and hook it up to the database: http://www.coderthing.com/solr-with-multicore-and-database-hook-part-1/ I hope it helps! D. On Thu, Jan 10, 2013 at 6:19 PM, hassancrowdc hassancrowdc...@gmail.comwrote: Hi, i am trying to index multiple tables in solr. I am not sure which data config file to be changed there are so many of them(like solr-data-config, db-data-config)? Also, do i have to change the id, name and desc to the name of the columns in my table? and how do i add solr_details field in schema? -- View this message in context: http://lucene.472066.n3.nabble.com/Index-data-from-multiple-tables-into-Solr-tp4032266.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: configuring schema to match database
Hi Niklas, Maybe this link helps: http://www.coderthing.com/solr-with-multicore-and-database-hook-part-1/ D. On Fri, Jan 11, 2013 at 2:19 PM, Niklas Langvig niklas.lang...@globesoft.com wrote: Hi! I'm quite new to solr and trying to understand how to create a schema from how our postgres database and then search for the content in solr instead of querying the db. My question should be really easy, it has most likely been asked many times but still I'm not able to google any answer to it. To make it easy, I have 3 columns: users, courses and languages Users has columns , userid, firstname, lastname Courses has column coursename, startdate, enddate Languages has column language, writingskill, verbalskill UserA has taken courseA, courseB and courseC and has writingskill good verbalskill good for english and writingskill excellent verbalskill excellent for spanish UserB has taken courseA, courseF, courseG and courseH and has writingskill fluent verbalskill fluent for english and writingskill good verbalskill good for italian I would like to put this data into solr so I can search for all users how have taken courseA and are fluent in english. Can I do that? The problem is I'm not sure how to flatten this database into a schema It's easy to understand the users column, for example field name=userid type=string indexed=true / field name=firstname type=string indexed=true / field name=lastname type=string indexed=true / But then I'm not so sure how the schema should look like for courses and languages field name=userid type=string indexed=true / field name=coursename type=string indexed=true / field name=startdate type=string indexed=true / field name=enddate type=string indexed=true / Thanks for any help /Niklas
Re: configuring schema to match database
Hi, No, it has actually two tables. User and Item. The example shown on the blog is for one table, because you repeat the same thing for the other table. Only your data-import.xml file changes. For the rest, just copy and paste it in the conf directory. If you are running your solr in Linux, then you can work with symlinks. D. On Fri, Jan 11, 2013 at 3:12 PM, Niklas Langvig niklas.lang...@globesoft.com wrote: Hi Dariusz, To me this example has one table user and I have many tables that connects to one user and that is what I'm unsure how how to do. /Niklas -Ursprungligt meddelande- Från: Dariusz Borowski [mailto:darius...@gmail.com] Skickat: den 11 januari 2013 14:56 Till: solr-user@lucene.apache.org Ämne: Re: configuring schema to match database Hi Niklas, Maybe this link helps: http://www.coderthing.com/solr-with-multicore-and-database-hook-part-1/ D. On Fri, Jan 11, 2013 at 2:19 PM, Niklas Langvig niklas.lang...@globesoft.com wrote: Hi! I'm quite new to solr and trying to understand how to create a schema from how our postgres database and then search for the content in solr instead of querying the db. My question should be really easy, it has most likely been asked many times but still I'm not able to google any answer to it. To make it easy, I have 3 columns: users, courses and languages Users has columns , userid, firstname, lastname Courses has column coursename, startdate, enddate Languages has column language, writingskill, verbalskill UserA has taken courseA, courseB and courseC and has writingskill good verbalskill good for english and writingskill excellent verbalskill excellent for spanish UserB has taken courseA, courseF, courseG and courseH and has writingskill fluent verbalskill fluent for english and writingskill good verbalskill good for italian I would like to put this data into solr so I can search for all users how have taken courseA and are fluent in english. Can I do that? The problem is I'm not sure how to flatten this database into a schema It's easy to understand the users column, for example field name=userid type=string indexed=true / field name=firstname type=string indexed=true / field name=lastname type=string indexed=true / But then I'm not so sure how the schema should look like for courses and languages field name=userid type=string indexed=true / field name=coursename type=string indexed=true / field name=startdate type=string indexed=true / field name=enddate type=string indexed=true / Thanks for any help /Niklas
Re: Reading properties in data-import.xml
Thanks Alex! This brought me to the solution I wanted to achieve. :) D. On Thu, Jan 10, 2013 at 3:21 PM, Alexandre Rafalovitch arafa...@gmail.comwrote: dataimport.properties is for DIH to store it's own properties for delta processing and things. Try solrcore.properties instead, as per recent discussion: http://lucene.472066.n3.nabble.com/Reading-database-connection-properties-from-external-file-td4031154.html Regards, Alex. Personal blog: http://blog.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Thu, Jan 10, 2013 at 3:58 AM, Dariusz Borowski darius...@gmail.com wrote: I'm having a problem using a property file in my data-import.xml file. My aim is to not hard code some values inside my xml file, but rather reusing the values from a property file. I'm using multicore and some of the values are being changed from time to time and I do not want to change them in all my data-import files. For example: dataSource type=JdbcDataSource driver=com.mysql.jdbc.Driver url=jdbc:mysql://${host}:3306/projectX user=${username} password=${password} / I tried everything, but don't know how I can use proporties here. I tried to put my values in dataimport.properties, located under SOLR-HOME/conf and under SOLR-HOME/core1/conf, but without any success. Please, could someone help me on this?
Re: configuring schema to match database
I don't know how to query multiple cores and if it's possible at once, but otherwise I would create a JOIN sql script if you need values from multiple tables. D. On Fri, Jan 11, 2013 at 3:27 PM, Niklas Langvig niklas.lang...@globesoft.com wrote: Ahh sorry, Now I understand, Ok seems like a good solution, I just know need to understand how to query multiple cores now :) -Ursprungligt meddelande- Från: Dariusz Borowski [mailto:darius...@gmail.com] Skickat: den 11 januari 2013 15:15 Till: solr-user@lucene.apache.org Ämne: Re: configuring schema to match database Hi, No, it has actually two tables. User and Item. The example shown on the blog is for one table, because you repeat the same thing for the other table. Only your data-import.xml file changes. For the rest, just copy and paste it in the conf directory. If you are running your solr in Linux, then you can work with symlinks. D. On Fri, Jan 11, 2013 at 3:12 PM, Niklas Langvig niklas.lang...@globesoft.com wrote: Hi Dariusz, To me this example has one table user and I have many tables that connects to one user and that is what I'm unsure how how to do. /Niklas -Ursprungligt meddelande- Från: Dariusz Borowski [mailto:darius...@gmail.com] Skickat: den 11 januari 2013 14:56 Till: solr-user@lucene.apache.org Ämne: Re: configuring schema to match database Hi Niklas, Maybe this link helps: http://www.coderthing.com/solr-with-multicore-and-database-hook-part-1 / D. On Fri, Jan 11, 2013 at 2:19 PM, Niklas Langvig niklas.lang...@globesoft.com wrote: Hi! I'm quite new to solr and trying to understand how to create a schema from how our postgres database and then search for the content in solr instead of querying the db. My question should be really easy, it has most likely been asked many times but still I'm not able to google any answer to it. To make it easy, I have 3 columns: users, courses and languages Users has columns , userid, firstname, lastname Courses has column coursename, startdate, enddate Languages has column language, writingskill, verbalskill UserA has taken courseA, courseB and courseC and has writingskill good verbalskill good for english and writingskill excellent verbalskill excellent for spanish UserB has taken courseA, courseF, courseG and courseH and has writingskill fluent verbalskill fluent for english and writingskill good verbalskill good for italian I would like to put this data into solr so I can search for all users how have taken courseA and are fluent in english. Can I do that? The problem is I'm not sure how to flatten this database into a schema It's easy to understand the users column, for example field name=userid type=string indexed=true / field name=firstname type=string indexed=true / field name=lastname type=string indexed=true / But then I'm not so sure how the schema should look like for courses and languages field name=userid type=string indexed=true / field name=coursename type=string indexed=true / field name=startdate type=string indexed=true / field name=enddate type=string indexed=true / Thanks for any help /Niklas
Reading properties in data-import.xml
I'm having a problem using a property file in my data-import.xml file. My aim is to not hard code some values inside my xml file, but rather reusing the values from a property file. I'm using multicore and some of the values are being changed from time to time and I do not want to change them in all my data-import files. For example: dataSource type=JdbcDataSource driver=com.mysql.jdbc.Driver url=jdbc:mysql://${host}:3306/projectX user=${username} password=${password} / I tried everything, but don't know how I can use proporties here. I tried to put my values in dataimport.properties, located under SOLR-HOME/conf and under SOLR-HOME/core1/conf, but without any success. Please, could someone help me on this?
Reading properties in data-import.xml
I'm having a problem using a property file in my data-import.xml file. My aim is to not hard code some values inside my xml file, but rather reusing the values from a property file. I'm using multicore and some of the values are being changed from time to time and I do not want to change them in all my data-import files. For example: dataSource type=JdbcDataSource driver=com.mysql.jdbc.Driver url=jdbc:mysql://${host}:3306/projectX user=${username} password=${password} / I tried everything, but don't know how I can use proporties here. I tried to put my values in dataimport.properties, located under SOLR-HOME/conf and under SOLR-HOME/core1/conf, but without any success. Please, could someone help me on this?
Re: Reading properties in data-import.xml
Thanks Alexandre! I followed your example and created a solrcore.properties in solr.home/conf/solrcore.properties. I created a symlink in my core/conf to the solrcore.properties file, but I can't read the properties. My properties file: username=myusername password=mypassword My data-import.xml: dataSource type=JdbcDataSource driver=com.mysql.jdbc.Driver url=jdbc:mysql://${host}:3306/projectX user=${username} password=${password} / Is the syntax correct? Best regards, Dariusz On Thu, Jan 10, 2013 at 3:21 PM, Alexandre Rafalovitch arafa...@gmail.comwrote: dataimport.properties is for DIH to store it's own properties for delta processing and things. Try solrcore.properties instead, as per recent discussion: http://lucene.472066.n3.nabble.com/Reading-database-connection-properties-from-external-file-td4031154.html Regards, Alex. Personal blog: http://blog.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Thu, Jan 10, 2013 at 3:58 AM, Dariusz Borowski darius...@gmail.com wrote: I'm having a problem using a property file in my data-import.xml file. My aim is to not hard code some values inside my xml file, but rather reusing the values from a property file. I'm using multicore and some of the values are being changed from time to time and I do not want to change them in all my data-import files. For example: dataSource type=JdbcDataSource driver=com.mysql.jdbc.Driver url=jdbc:mysql://${host}:3306/projectX user=${username} password=${password} / I tried everything, but don't know how I can use proporties here. I tried to put my values in dataimport.properties, located under SOLR-HOME/conf and under SOLR-HOME/core1/conf, but without any success. Please, could someone help me on this?