Using Solr for term-completion with counts

2009-10-26 Thread Jonathan Hendler
Greetings all, We're happily migrating our MySQL fulltext search to SOLR/faceted search. We're doing a term suggest on a large text field and doing facet.sort=count. The numbers returned represent total times the term shows up - I'd like to have the numbers represent the total documents

Re: Using Solr for term-completion with counts

2009-10-26 Thread Jonathan Hendler
at 5:56 PM, David Smiley @MITRE.org wrote: Jon, there actually is an example of this in my book. Go to page 156. I looked and found "term-suggest" in the index. ~ David Smiley Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/ Jonathan Hendler-3 wrote: Greetings

Re: Using Solr for term-completion with counts

2009-10-26 Thread Jonathan Hendler
Yonik, Thanks. One question inline below: On Oct 26, 2009, at 5:30 PM, Yonik Seeley wrote: Can I do this through a facet query or another param ? Faceting should also work... the terms component is very much like the faceting component except that it always works over the complete index (in

Simple problem with a nested entity and it's SQL

2009-10-28 Thread Jonathan Hendler
I have a nested entity on a jdbc data import handler that is causing an SQL error because the second key is either NULL (blank when generating the sql) or non-zero INT. The query is in the following form: transformer="TemplateTransformer" query="SELECT * FROM table1 ">

Re: Simple problem with a nested entity and it's SQL

2009-10-28 Thread Jonathan Hendler
27;t this work too? SELECT * FROM table2 WHERE IS NOT NULL ${table1.somethin_like_a_foreign_key} AND ${table1.somethin_like_a_foreign_key} > 0 AND id = ${table1.somethin_like_a_foreign_key} Cheers Avlesh On Wed, Oct 28, 2009 at 11:03 PM, Jonathan Hendler < jonathan.hend...@gmail.com> wro

Re: Simple problem with a nested entity and it's SQL

2009-10-28 Thread Jonathan Hendler
lesh Singh wrote: Assuming this to be MySQL, will this work - SELECT * FROM table2 WHERE id = IF(ISNULL(${table1.somethin_like_a_foreign_key}), 0, ${table1.somethin_like_a_foreign_key}); Cheers Avlesh On Wed, Oct 28, 2009 at 11:12 PM, Jonathan Hendler < jonathan.hend...@gmail.com> wrot

Re: Simple problem with a nested entity and it's SQL

2009-10-28 Thread Jonathan Hendler
les and seems like separate queries (in terms of performance). On Oct 28, 2009, at 2:49 PM, Fuad Efendi wrote: Why can't we use single entity with single SELECT ... LEFT OUTER JOIN ...? -Original Message- From: Jonathan Hendler [mailto:jonathan.hend...@gmail.com] Sent: O

Proper way to set up Multi Core / Core admin

2009-11-02 Thread Jonathan Hendler
Getting started with multi core setup following http://wiki.apache.org/solr/CoreAdmin and the book. Generally everything makes sense, but I have one question. Here's how easy it was: place the solr.war into the server create your core directories in the newly created solr/ directory set up s

Re: Proper way to set up Multi Core / Core admin

2009-11-02 Thread Jonathan Hendler
Sorry for the confusion - step four is to be avoided, obviously. On Nov 2, 2009, at 11:46 PM, Jonathan Hendler wrote: Getting started with multi core setup following http://wiki.apache.org/solr/CoreAdmin and the book. Generally everything makes sense, but I have one question. Here'

Re: character encoding issue

2009-11-04 Thread Jonathan Hendler
Hi Peter, I have the same set of issues and will look for a response here. Sometimes those other chars can be create at the time of input (like extraction from a Microsoft Office doc from third part tool for example). But MySQL looking OK in the browser might be because the encoding of MyS

Bug with DIH and MySQL CONCAT()?

2009-11-04 Thread Jonathan Hendler
Hi All, I have an SQL query that begins with "SELECT CONCAT ( 'ID', Subject.id , ':' , Subject.name , ':L', Subject.level) as subject_name" and the query runs great against MySQL from the command line. Since this is a nested entity, the schema.xml contains "name="subject_name" type="strin

Re: solr query help alpha numeric and not

2009-11-04 Thread Jonathan Hendler
Hi Joel, The ID is sent back as a string (instead of as an integer) in your example. Could this be the cause? - Jonathan On Nov 4, 2009, at 9:08 AM, Joel Nylund wrote: Hi, I have a field called firstLetterTitle, this field has 1 char, it can be anything, I need help with a few queries on

Re: Bug with DIH and MySQL CONCAT()?

2009-11-04 Thread Jonathan Hendler
Thanks Chantal for the explanation of the issue. Avlesh - worked great. Thank you! On Nov 4, 2009, at 9:44 AM, Avlesh Singh wrote: Try cast(concat(...) as char) ... Cheers Avlesh On Wed, Nov 4, 2009 at 7:36 PM, Jonathan Hendler wrote: Hi All, I have an SQL query that begins with