Thank you. This isn't a situation where I have access to a schema so I
don't think I can make use of the FieldType methods. I'm implementing a
Match stream as part of the streaming api (our discussion in
https://issues.apache.org/jira/browse/SOLR-8530).

An arbitrary tuple can come in with calculated values so the types of the
values can't necessarily be determined from a schema. Due to this, I'm
taking all fields in the tuple and constructing a document (see
https://github.com/dennisgove/lucene-solr/blob/SolrMatch/solr/core/src/java/org/apache/solr/handler/LuceneMatchStream.java#L195
).

(side note: the working name is LuceneMatchStream because atm it only
accepts Lucene syntax for the queries)

- Dennis


On Mon, Jan 2, 2017 at 4:45 PM, David Smiley <david.w.smi...@gmail.com>
wrote:

> LongPoint uses the Points API.  If you are using a Solr QParserPlugin,
> it's not going to use that API. Assuming you're in Solr land, I think you
> should be using utility methods on FieldType (lookup from schema) which can
> create the Field instances to be put on the document.
>
> ~ David
>
> > On Jan 2, 2017, at 4:33 PM, Dennis Gove <dpg...@gmail.com> wrote:
> >
> > I'm messing around with a MemoryIndex and am indexing a field of type
> Long. From everything I can tell, this should be added into a Document as
> type org.apache.lucene.document.LongPoint. However, when I try to match
> it with a query of form "a_i:1" it doesn't match.
> >
> > For example, full document is
> > {
> >   a_s:"hello1",
> >   a_i:1
> > }
> > with Query object created from
> > "a_i:1"
> >
> > the return in call to
> > index.search(query)
> >
> > is 0 (ie, a non-match)
> >
> > The only thing I can think of is that the document field should actually
> be something else, or that the creation of a Query object from "a_i:1"
> isn't going to match a LongPoint value.
> >
> > Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>
>

Reply via email to