lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis.gospodne...@gmail.com>
Subject Re: dynamic field question
Date Wed, 09 Oct 2013 11:25:55 GMT
David,

Yes. Document grouping (aka  field collapsing) will help you here. It
should also allow you to create a better search experience on the front end
- it's often better to narrow down where in a large document a match is
than give users a large doc and say: we know the match is in here
somewhere, you just have to locate it now.

Otis
Solr & ElasticSearch Support
http://sematext.com/
On Oct 9, 2013 6:21 AM, "Twomey, David" <david.twomey@novartis.com> wrote:

> OK.  Then the JSON returned would contain a lot of documents that are
> really sections. This would work fine for the use-case I mentioned but I
> also use the index for full-text search of the whole document.  Therefore,
> I would need to parse the result JSON in a way that combines the solr docs
> returned in to one virtual doc based on source document ID.
>
> Is that correct?
>
> On 10/9/13 6:15 AM, "Jack Krupansky" <jack@basetechnology.com> wrote:
>
> >I'd suggest that each of your source document sections would be a
> >distinct
> >solr document. All of the sections could have a "source document ID"
> >field
> >to tie them together.
> >
> >Dynamic fields work best when used in moderation. Your use case seems
> >like
> >an excessive use of dynamic fields.
> >
> >-- Jack Krupansky
> >
> >-----Original Message-----
> >From: Twomey, David
> >Sent: Tuesday, October 08, 2013 6:59 PM
> >To: solr-user@lucene.apache.org
> >Subject: dynamic field question
> >
> >
> >I am having trouble trying to return a particular dynamic field only
> >instead
> >of all dynamic fields.
> >
> >Imagine I have a document with an unknown number of sections.  Each
> >section
> >can have a 'title' and a 'body'
> >
> >I have each section title and body as dynamic fields such as
> >section_title_*
> >and section_body_*
> >
> >Imagine that some documents contain a section that has a title="Appendix"
> >
> >I want a query that will find all docs with that section and return just
> >the
> >Appendix section.
> >
> >I don't know how to return just that one section though
> >
> >I can copyField my dynamic field section_title_* into a static field
> >called
> >section_titles and query that for docs that contain the Appendix
> >
> >But I don't know how to only return that one dynamic field
> >
> >?q=section_titles:Appendix&fl=section_body_*
> >
> >Any ideas?   I can't seem to put a conditional in the fl parameter
> >
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message