Multiple Values -Structured?

2007-09-02 Thread Bharani

Hi,

I have got two sets of document

1) Primary Document
2) Occurrences of primary document

Since there is no such thing as "join" i can either 

a) Post the primary document with occurrences as multi valued field
 or
b) Post the primary document for every occurrences i.e. classic
de-normalized route

My problem with 

Option a) This works great as long as the occurrence is a single field but
if i had a group of fields that describes the occurrence then the search
returns wrong results becuase of the nature of text search

i.e 1 Jan 2007
 review

 2 Jan 2007 
 revision

if i search for 2 Jan 2007 and  1 Jan 2007  i will get a hit
(which is wrong)  becuase there is no grouping of fields to associate date
and type as one unit. If i merge them as one entity then i cant use the
range quieries for date

Option B) This would result in large number of documents and even if i try
with index only and not store i am still have to deal with duplicate hit -
becuase all i want is the primary document


Is there a better approach to the problem?

Thanks
Bharani


-- 
View this message in context: 
http://www.nabble.com/Multiple-Values--Structured--tf4370282.html#a12456399
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Multiple Values -Structured?

2007-09-04 Thread Bharani

Thanks Yonik - I didnt know that before. But i am not sure how i can use the
range queries on this compound field so that i dont get the wrong result. 

-Bharani


Yonik Seeley wrote:
> 
> You could index both a compound field and the components separately.
> This could be simplified by sending the value in once as the compound
> format:
>   review,1 Jan 2007
>   revision, 2 Jan 200
> And then use a copyField with a regex tokenizer to extract and index
> the date into a separate field.  You could index the type separately
> via the same mechanism.
> 
> -Yonik
> 
> On 9/3/07, Bharani <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I have got two sets of document
>>
>> 1) Primary Document
>> 2) Occurrences of primary document
>>
>> Since there is no such thing as "join" i can either
>>
>> a) Post the primary document with occurrences as multi valued field
>>  or
>> b) Post the primary document for every occurrences i.e. classic
>> de-normalized route
>>
>> My problem with
>>
>> Option a) This works great as long as the occurrence is a single field
>> but
>> if i had a group of fields that describes the occurrence then the search
>> returns wrong results becuase of the nature of text search
>>
>> i.e 1 Jan 2007
>>  review
>>
>>  2 Jan 2007 
>>  revision
>>
>> if i search for 2 Jan 2007 and  1 Jan 2007  i will get a hit
>> (which is wrong)  becuase there is no grouping of fields to associate
>> date
>> and type as one unit. If i merge them as one entity then i cant use the
>> range quieries for date
>>
>> Option B) This would result in large number of documents and even if i
>> try
>> with index only and not store i am still have to deal with duplicate hit
>> -
>> becuase all i want is the primary document
>>
>>
>> Is there a better approach to the problem?
>>
>> Thanks
>> Bharani
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Multiple-Values--Structured--tf4370282.html#a12456399
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-Values--Structured--tf4370282.html#a12479706
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Multiple Values -Structured?

2007-09-04 Thread Bharani

No Size is not an issue - atleast for now. But i am thinking of implementing
some sort of duplicate removal based on field. I happen to look at this
thread
http://www.nabble.com/Group-results-by-field--tf3683765.html#a10296394

Tom mentions some changes to the code to do that so was thinking in those
lines too. Any idea how you can do this with out changes to solr?

Thanks
Bharani



Jed Reynolds-2 wrote:
> 
> Bharani wrote:
>> Hi,
>>
>> I have got two sets of document
>>
>> 1) Primary Document
>> 2) Occurrences of primary document
>>
>> Since there is no such thing as "join" i can either 
>>
>> a) Post the primary document with occurrences as multi valued field
>>  or
>> b) Post the primary document for every occurrences i.e. classic
>> de-normalized route
>>
>> My problem with 
>>
>> Option a) This works great as long as the occurrence is a single field
>> but
>> if i had a group of fields that describes the occurrence then the search
>> returns wrong results becuase of the nature of text search
>>
>> i.e 1 Jan 2007
>>  review
>>
>>  2 Jan 2007 
>>  revision
>>
>> if i search for 2 Jan 2007 and  1 Jan 2007  i will get a hit
>> (which is wrong)  becuase there is no grouping of fields to associate
>> date
>> and type as one unit. If i merge them as one entity then i cant use the
>> range quieries for date
>>
>> Option B) This would result in large number of documents and even if i
>> try
>> with index only and not store i am still have to deal with duplicate hit
>> -
>> becuase all i want is the primary document
>>
>>
>> Is there a better approach to the problem?
>>   
> 
> Are you concerned about the size of your index?
> 
> One of the difficulties that you're going to find with multi-valued 
> fields is that they are an unordered collection without relation. If you 
> have a document with a list of editors and revisions, the two fields 
> have no inherent correlation unless your application can extract it from 
> the data itself.
> 
> [doc]
> [id]123[/id]
> [str name=name]hello world[/str]
> [array name=editor]
> [str name=editor]Fred[/str]
> [str name=editor]Bob[/str]
> [/array]
> [array name=revisiondate]
>[date name=revisiondate]2006-01-01T00:00:00Z[/date]
>[date name=revisiondate]2006-01-02T00:00:00Z[/date]
> [/array]
> [/doc]
> 
> If your application can decipher that and do a slice on it showing a 
> revision...then brilliant! But if the multi-value fields are out of 
> order, that might make a significant different.
> 
> I would create a document per revision and take advantage of range 
> queries and sorting available at the query level.
> 
> 
> 
> 
> Jed
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-Values--Structured--tf4370282.html#a12479721
Sent from the Solr - User mailing list archive at Nabble.com.



Combining Proximity & Range search

2007-09-15 Thread Bharani

Hi,

Is it possible to combine proximity search together with range in a query.
My document will have a multivalued compound field like

revision_01012007
review_02012007

i am thinking of a query like comp:"type:review date:[02012007 TO
02282007]"~0
type and date are fields indexed by copyField extracted from the compound
comp field

Is this possible with solr? 

Thanks
Bharani
-- 
View this message in context: 
http://www.nabble.com/Combining-Proximity---Range-search-tf4450179.html#a12696909
Sent from the Solr - User mailing list archive at Nabble.com.



Control index/store at document level

2007-09-16 Thread Bharani

Hi,

Is it possible to turn off the "store" option based on field value. I would
like to index and store the primary document but for all revisions i only
need to index it and not store it. 

Thanks
Bharani
-- 
View this message in context: 
http://www.nabble.com/Control-index-store-at-document-level-tf4450446.html#a12697579
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Combining Proximity & Range search

2007-09-18 Thread Bharani

I am trying my best to figure out the correct way to do this
http://www.nabble.com/forum/ViewPost.jtp?post=12456399&framed=y

I just came across the collapseFilter ( solr 236). I think i will give that
a try. 

Thanks hossman for the reply

Bharani  


hossman wrote:
> 
> 
> : My document will have a multivalued compound field like
> : 
> : revision_01012007
> : review_02012007
> : 
> : i am thinking of a query like comp:"type:review date:[02012007 TO
> : 02282007]"~0
> 
> your best bet is to change that so "revision" and "review" are the names 
> of a field, and do a range search on them as needed.
> 
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Combining-Proximity---Range-search-tf4450179.html#a12751291
Sent from the Solr - User mailing list archive at Nabble.com.



RE: Solr + autocomplete

2007-10-18 Thread Bharani

You should take a look at http:\\www.extjs.com. The combo box has got an
autocomplete fultionality. Infact it even has paging built into it. I just
did a demo using Solr for autocomplete and i got a very good responsive GUI.
I have got about 100,000 documents with 26 fields each and get a response <
1s

Hope that helps
-Bharani

Park, Michael wrote:
> 
> Thanks!  That's a good suggestion too.  I'll look into that.
> 
> Actually, I was hoping someone had used a reliable JS library that
> accepted JSON. 
> 
> -Original Message-
> From: Ryan McKinley [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 15, 2007 4:44 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Solr + autocomplete
> 
>> 
>> I would imagine there is a library to set up an autocomplete search
> with
>> Solr.  Does anyone have any suggestions?  Scriptaculous has a
> JavaScript
>> autocomplete library.  However, the server must return an unordered
>> list.
>> 
> 
> Solr does not provide an autocomplete UI, but it can return JSON that a 
> JS library can use to populate an autocomplete.
> 
> Depending on you index size/ query speed, you may be fine with a 
> standard faceting prefix filter.  If the index is large, you may want to
> 
> index using the EdgeNGramFilterFactory.
> 
> Check the last comment in:
> https://issues.apache.org/jira/browse/SOLR-357
> 
> ryan
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Solr-%2B-autocomplete-tf4630140.html#a13271445
Sent from the Solr - User mailing list archive at Nabble.com.