deltaImportQuery in child entity

2009-05-06 Thread Martin Davidsson
Hello, I have a data-config.xml that is structured in the following  
fashion:



   deltaImportQuery="deltaParentImportQuery" deltaQuery="deltaParentQuery">
  deltaImportQuery="deltaChildImportQuery" />

   


Is the deltaImportQuery attribute even allowed on the child entity?  
The behavior I'm seeing is that when I issue a delta-import command,  
Solr uses the deltaParentImportQuery and deltaParentQuery from the  
parent entity but the fullChildQuery from the child entity. I was  
hoping it would use the deltaChildImportQuery on the child entity to  
figure out what data to use in the case of a delta-import. Is the  
behavior I'm seeing expected? Is it possible to write data-config.xml  
in a way that I can use different queries to pull in the field data  
for a child entity depending on whether I'm doing a full- or delta- 
import? I'm using the nightly build from March 24, 2009. Thanks!


-- Martin Davidsson


Re: preImportDeleteQuery

2009-05-07 Thread Martin Davidsson

On May 7, 2009, at 4:52 PM, wojtekpia wrote:


Hi,
I'm importing data using the DIH. I manage all my data updates  
outside of

Solr, so I use the full-import command to update my index (with
clean=false). Everything works fine, except that I can't delete  
documents
easily using the DIH. I noticed the preImportDeleteQuery attribute,  
but
doesn't seem to do what I'm looking for. I'm looking to do something  
like:


preImportDeleteQuery="ItemId={select ItemId from table where
status='delete'}"

http://issues.apache.org/jira/browse/SOLR-1059 SOLR-1059  seems to  
address
this, but I couldn't find any documentation for it in the wiki. Can  
someone

provide an example of how to use this?

Thanks,

Wojtek
--
View this message in context: 
http://www.nabble.com/preImportDeleteQuery-tp23437674p23437674.html
Sent from the Solr - User mailing list archive at Nabble.com.


I haven't used those special variables but I noticed an example of  
$skipDoc in the wiki under the "Indexing Wikipedia" example (http://wiki.apache.org/solr/DataImportHandler 
).


-- Martin

fq vs. q

2009-06-02 Thread Martin Davidsson
I've tried to read up on how to decide, when writing a query, what  
criteria goes in the q parameter and what goes in the fq parameter, to  
achieve optimal performance. Is there some documentation that  
describes how each field is treated internally, or even better, some  
kind of rule of thumb to help me decide how to split things up when  
querying against one or more fields. In most cases, I'm looking for  
exact matches but sometimes an occasional wildcard query shows up too.  
Thank you!


-- Martin



Re: fq vs. q

2009-06-03 Thread Martin Davidsson
On Wed, Jun 3, 2009 at 1:53 AM, Marc Sturlese wrote:

>
> It's definitely not proper documentation but maybe can give you a hand:
>
> http://www.derivante.com/2009/04/27/100x-increase-in-solr-performance-and-throughput/
>
>
> Martin Davidsson-2 wrote:
> >
> > I've tried to read up on how to decide, when writing a query, what
> > criteria goes in the q parameter and what goes in the fq parameter, to
> > achieve optimal performance. Is there some documentation that
> > describes how each field is treated internally, or even better, some
> > kind of rule of thumb to help me decide how to split things up when
> > querying against one or more fields. In most cases, I'm looking for
> > exact matches but sometimes an occasional wildcard query shows up too.
> > Thank you!
> >
> > -- Martin
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/fq-vs.-q-tp23845282p23847845.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Thanks, I'd seen that article too. I totally agree that it's worth
understanding how things are treated under the hood. That's the kind of
literature I'm looking for I guess. Given that article, I wasn't sure what
the query would look like if I need to query against multiple fields. Let's
say I have a "name" field and a "brand" field and I want to find the Apple
iPod. Using only the 'q' param the query would look like
select?q=brand:Apple AND name:iPod

Is there a better query format that utilizes the fq field? Thanks again

-- Martin


Changing the score of a document based on the value of a field

2009-06-23 Thread Martin Davidsson
The SolrRelevancyFAQ has a heading that's the same as my message's  
subject:


http://wiki.apache.org/solr/SolrRelevancyFAQ#head-f013f5f2811e3ed28b200f326dd686afa491be5e

There's a TODO on the wiki to provide an actual example. Does anybody  
happen to have an example handy that I could model my query after?  
Thank you


-- Martin