Re: Is DataImportHandler ThreadSafe???

2009-12-19 Thread Noble Paul നോബിള്‍ नोब्ळ्
On Sat, Dec 19, 2009 at 2:16 PM, gurudev  wrote:
>
> Hi,
> Just wanted to know, Is the DataImportHandler available in solr1.3
> thread-safe?. I would like to use multiple instances of data import handler
> running concurrently and posting my various set of data from DB to Index.
>
> Can I do this by registering the DIH multiple times with various names in
> solrconfig.xml and then invoking all concurrently to achieve maximum
> throughput? Would i need to define different data-config.xml's &
> dataimport.properties for each DIH?
yes , this should work. it is thread-safe
>
> If it would be possible to specify the query in data-config.xml to restrict
> one DIH from overlapping the data-set fetched by another DIH through some
> SQL clauses?
>
> --
> View this message in context: 
> http://old.nabble.com/Is-DataImportHandler-ThreadSafetp26853521p26853521.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
-
Noble Paul | Systems Architect| AOL | http://aol.com


Re: Sort fields all look Strings in field cache, no matter schema type

2009-12-19 Thread Jay Hill
Oh, forgot to add (just to keep the thread complete), the field is being
used for a sort, so it was able to use TrieDoubleField.

Thanks again,
-Jay


On Sat, Dec 19, 2009 at 12:21 PM, Jay Hill  wrote:

> This field is of class type solr.SortableDoubleField.
>
> I'm actually migrating a project from Solr 1.1 to 1.4, and am in the
> process of trying to update the schema and solrconfig in stages. Updating
> the field to TrieDoubleField w/ precisionStep=0 definitely helped.
>
> Thanks Yonik!
> -Jay
>
>
>
>
> On Sat, Dec 19, 2009 at 11:37 AM, Yonik Seeley  > wrote:
>
>> On Sat, Dec 19, 2009 at 2:25 PM, Jay Hill  wrote:
>> > One thing that struck me as odd in the output of the stats.jsp page is
>> that
>> > the field cache always shows a String type for a field, even if it is
>> not a
>> > String. For example, the output below is for a field "cscore" that is a
>> > double:
>>
>> What's the class type of the double?  Older style SortableDouble had
>> to use the string index.  Newer style trie-double based should use a
>> double[].
>>
>> It also matters what the FieldCache entry is being used for... certain
>> things like faceting on single valued fields still use the
>> StringIndex.  I believe the stats component does too.  Sorting and
>> function queries should work as expected.
>>
>> -Yonik
>>
>
>


Re: Sort fields all look Strings in field cache, no matter schema type

2009-12-19 Thread Jay Hill
This field is of class type solr.SortableDoubleField.

I'm actually migrating a project from Solr 1.1 to 1.4, and am in the process
of trying to update the schema and solrconfig in stages. Updating the field
to TrieDoubleField w/ precisionStep=0 definitely helped.

Thanks Yonik!
-Jay



On Sat, Dec 19, 2009 at 11:37 AM, Yonik Seeley
wrote:

> On Sat, Dec 19, 2009 at 2:25 PM, Jay Hill  wrote:
> > One thing that struck me as odd in the output of the stats.jsp page is
> that
> > the field cache always shows a String type for a field, even if it is not
> a
> > String. For example, the output below is for a field "cscore" that is a
> > double:
>
> What's the class type of the double?  Older style SortableDouble had
> to use the string index.  Newer style trie-double based should use a
> double[].
>
> It also matters what the FieldCache entry is being used for... certain
> things like faceting on single valued fields still use the
> StringIndex.  I believe the stats component does too.  Sorting and
> function queries should work as expected.
>
> -Yonik
>


get field values from solr and highlight text?

2009-12-19 Thread Faire Mii

Ive got the following code.

$params = array('defType' => 'dismax', 'qf' => 'threads.title  
posts.body tags.name', 'hl' => 'true');


$results = $solr->search($query, $offset, $limit, $params);

So the keywords will be highlighted. What i dont know how to do is  
pulling the data out from $results. How do I get a documents field  
values and then show the body and hightlight it like google/SO search?  
Im using solr client php but i find it difficult to understand how to  
use it. There is so few example codes.


could someone guide me a little...

Re: Sort fields all look Strings in field cache, no matter schema type

2009-12-19 Thread Yonik Seeley
On Sat, Dec 19, 2009 at 2:25 PM, Jay Hill  wrote:
> One thing that struck me as odd in the output of the stats.jsp page is that
> the field cache always shows a String type for a field, even if it is not a
> String. For example, the output below is for a field "cscore" that is a
> double:

What's the class type of the double?  Older style SortableDouble had
to use the string index.  Newer style trie-double based should use a
double[].

It also matters what the FieldCache entry is being used for... certain
things like faceting on single valued fields still use the
StringIndex.  I believe the stats component does too.  Sorting and
function queries should work as expected.

-Yonik


Sort fields all look Strings in field cache, no matter schema type

2009-12-19 Thread Jay Hill
I'm on a project where I'm trying to determine the size of the field cache.
We're seeing lots of memory problems, and I suspect that the field cache is
extremely large, but I'm trying to get exact counts on what's in the field
cache.

One thing that struck me as odd in the output of the stats.jsp page is that
the field cache always shows a String type for a field, even if it is not a
String. For example, the output below is for a field "cscore" that is a
double:

entry#0 : 
'org.apache.lucene.index.readonlydirectoryrea...@6239da8a'=>'cscore',class

org.apache.lucene.search.FieldCache$StringIndex,null=>org.apache.lucene.search.FieldCache$StringIndex#297347471


The index has 4,292,426 documents, so I would expect the field cache size
for this field to be:
cscore: double (8 bytes) x 4,292,426 docs = 34,339,408 bytes

But can someone explain why a double is using FieldCache$StringIndex please?
No matter what the type of the field is in the schema the field cache stats
always show FieldCache$StringIndex.

Thanks,
-Jay


Re: need of projects

2009-12-19 Thread Gora Mohanty
On Fri, 18 Dec 2009 23:04:59 +0530
Naga raja  wrote:

> hi all,
> I am disparately in need some webpages that uses solr at backend
> and display the results..
> Plz can u send some PHP codes tht resembles like Google that uses
> Solr. Im new to solr.

In other words, please will someone do my (home)work for me.
For free! Please, won't you? This is all about open source,
isn't it?

Naga, please at least show people some evidence that you have
tried to struggle with implementing Solr, looked at the fairly
extensive documentation, read the book. etc. Usually, if someone
has done that, their questions are much more specific, e.g, I
tried to XYZ as described on the ABC Solr Wiki page, and still
could not manage to get things to work.

I think that you will find that people are more willing to help
in that case. Somewhat of an oldie now, but the page is still
worth reading: http://www.catb.org/~esr/faqs/smart-questions.html
(How To Ask Questions The Smart Way)

Regards,
Gora


Is DataImportHandler ThreadSafe???

2009-12-19 Thread gurudev

Hi,
Just wanted to know, Is the DataImportHandler available in solr1.3
thread-safe?. I would like to use multiple instances of data import handler
running concurrently and posting my various set of data from DB to Index.

Can I do this by registering the DIH multiple times with various names in
solrconfig.xml and then invoking all concurrently to achieve maximum
throughput? Would i need to define different data-config.xml's &
dataimport.properties for each DIH?

If it would be possible to specify the query in data-config.xml to restrict
one DIH from overlapping the data-set fetched by another DIH through some
SQL clauses?

-- 
View this message in context: 
http://old.nabble.com/Is-DataImportHandler-ThreadSafetp26853521p26853521.html
Sent from the Solr - User mailing list archive at Nabble.com.