lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From findbestopensource <findbestopensou...@gmail.com>
Subject Re: Using solrJ to get all fields in a particular schema/index
Date Tue, 25 May 2010 12:03:31 GMT
If a field doesn't have a value, You will get NULL on retrieving it. How
could you expect a value for a field which is not provided?

You have two options, choose either one..
1. If the fieldvalue is returned NULL then display a proper error / user
defined message. Handle the error.
 2. Add a dummy value say "NO_VALUE" to the title field, which doesn't have
any value.

Regards
Aditya
www.findbestopensource.com




On Tue, May 25, 2010 at 5:20 PM, Rakhi Khatwani <rkhatwani@gmail.com> wrote:

> Hi Aditya,
>           i can retrieve all documents. but cannot retrieve all the fields
> in a document(if it does not hv any value).
>
> For example i get a list of documents, some of the documents have some
> value
> for title field, and others mite not contain a value for title field. in
> anycase i need to get the entry for title in getFieldNames().
>
> How do i go about that?
>
> Regards,
> Raakhi
>
>
> On Tue, May 25, 2010 at 5:07 PM, findbestopensource <
>  findbestopensource@gmail.com> wrote:
>
> > Resending it as there is a typo error.
> >
> > To reterive all documents, You need to use the query/filter FieldName:*:*
> .
> >
> >
> > Regards
> > Aditya
> > www.findbestopensource.com
> >
> >
> > On Tue, May 25, 2010 at 4:29 PM, findbestopensource <
> > findbestopensource@gmail.com> wrote:
> >
> > > To reterive all documents, You need to use the query/filter
> > *FieldName:*:*
> > > *
> > > Regards
> > > Aditya
> > > www.findbestopensource.com
> > >
> > >
> > > On Tue, May 25, 2010 at 4:14 PM, Rakhi Khatwani <rkhatwani@gmail.com
> > >wrote:
> > >
> > >> Hi,
> > >>           Is there any way to get all the fields (irrespective of
> > whether
> > >> it contains a value or null) in solrDocument.
> > >> or
> > >> Is there any way to get all the fields in schema.xml of the url link (
> > >> http://localhost:8983/solr/core0/)??
> > >>
> > >> Regards,
> > >> Raakhi
> > >>
> > >
> > >
> >
>

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