I just found another feature/ticket to be able to update fields:
https://issues.apache.org/jira/browse/SOLR-2753
https://issues.apache.org/jira/browse/LUCENE-1231

-> CSF Column Stride Fields

This should work well with simple fields like category/date/...!?

So I have 2 options:
1.)
Introduce a rather complex logic on client side to form the right join query 
(or do join manually),
which should, as you stated, work even with complex queries.

2.)
Or do it straightforward, combine all docs to one and WAIT for one of the 
various "update field/doc"
features to be realized.


I think I'll give 1.) a try and wait for 2.) if I get into trouble.


Regards,

Kai Gülzau
  

-----Original Message-----
From: Thijs [mailto:vonk.th...@gmail.com] 
Sent: Monday, October 17, 2011 1:22 PM
To: solr-user@lucene.apache.org
Subject: Re: document update / nested documents / document join

Hi,

First. I'm not sure you know. But the join isn't like a join in a database it's 
more like
   select * from (set of documents that match query)
   where exists (set of documents that match join query)

I have some complex (multiple join fq) in one call and that is fine, so I think 
this query may work also.
other wise you could try something like:
q=*:*&fq={!join+from=out_ticketid+to=ticketid}(category:bugfixes+OR+out_category:bugfixes)&fq={!join+from=out_ticketid+to=ticketid}(body:answer+OR+out_body:answer)

My wish would also be that this where backported to 3.x. But if not we'll 
probably go live on 4.x

Thijs


On 17-10-2011 11:46, Kai Gülzau wrote:
> Nobody?
>
> SOLR-139 seems to be the most popular issue but I don’t think this will be 
> resolved in near future (this year). Right?
>
> So I will try SOLR-2272 as a workaround, split up my documents in "static" 
> and " frequently updated"
> and join them at query time.
>
> What is the exact join query to do a query like "category:bugfixes AND 
> body:answer"
>    matching "category:bugfixes" in doc1 and
>    matching "body:answer" in doc3
>    with just returning "doc 1"??
>
> I adopted the fieldnames of
> doc 3:
> type: out
> out_ticketid: 1001
> out_body: this is my answer
> out_category: other
>
> q={!join+from=out_ticketid+to=ticketid}(category:bugfixes+OR+out_categ
> ory:bugfixes)+AND+(body:answer+OR+out_body:answer)
>
>
> Writing this, I doubt this syntax is even possible!?
> Additionally I'm not sure if trunk with SOLR-2272 is "production ready".
>
> The only way to do what I want in a released 3.x version is to do several 
> searches and joining the results manually.
> e.g.
> q=category:bugfixes ->  doc1 ->  ticketid: 1001 q=body:answers ->  
> doc3 ->  ticket:1001
> ->  result ticketid:1001
>
> This I way I would lose benefits like faceted search etc. :-\
>
> Any suggestions?
>
>
> Regards,
>
> Kai Gülzau
>
> -----Original Message-----
> From: Kai Gülzau [mailto:kguel...@novomind.com]
> Sent: Thursday, October 13, 2011 4:52 PM
> To: solr-user@lucene.apache.org
> Subject: document update / nested documents / document join
>
> Hi *,
>
> i am a bit confused about what is the best way to achieve my requirements.
>
> We have a mail ticket system. A ticket is created when a mail is received by 
> the system:
>
> doc 1:
> uid: 1001_in
> ticketid: 1001
> type: in
> body: I have a problem
> category: bugfixes
> date: 201110131955
>
> This incoming document is static. While the ticket is in progress there is 
> another document representing the current/last state of the ticket. Some 
> fields of this document are updated frequently:
>
> doc 2:
> uid: 1001_out
> ticketid: 1001
> type: out
> body:
> category: bugfixes
> date: 201110132015
>
> a bit later (doc 2 is deleted/updated):
> doc 3:
> uid: 1001_out
> ticketid: 1001
> type: out
> body: this is my answer
> category: other
> date: 201110140915
>
> I would like to do a boolean search spanning multiple documents like 
> "category:bugfixes AND body:answer".
>
> I think it's the same what was proposed by:
> http://www.slideshare.net/MarkHarwood/proposal-for-nested-document-sup
> port-in-lucene
>
> So I dig into the deeps of Lucene and Solr tickets and now i am stuck 
> choosing the "right" way:
>
> https://issues.apache.org/jira/browse/LUCENE-2454 Nested Document 
> query support
> https://issues.apache.org/jira/browse/LUCENE-3171 
> BlockJoinQuery/Collector
> https://issues.apache.org/jira/browse/LUCENE-1879 Parallel incremental 
> indexing
> https://issues.apache.org/jira/browse/SOLR-139 Support 
> updateable/modifiable documents
> https://issues.apache.org/jira/browse/SOLR-2272 Join
>
>
> If it is easily possible to update one field in a document i would just merge 
> the two logical documents into one representing the whole ticket. But i can't 
> see this is already possible.
>
> SOLR-2272 seems to be the best solution by now but feels like workaround.
> " I can't update a document field so i split it up in static and dynamic 
> content and join both at query time."
>
> SOLR-2272 is committed to trunk/solr 4.
> Are there any planned release dates for solr 4 or a possible backport for 
> SOLR-2272 in 3.x?
>
>
> I would appreciate any suggestions.
>
> Regards,
>
> Kai Gülzau
>
>
>
>
>

Reply via email to