Examples of tokenStreamValue()


Examples of org.apache.lucene.document.Fieldable.tokenStreamValue()

        Token t = new Token();
        for (int k = 0; k < fields.length; k++) {
            Fieldable field = fields[k];
            // assume properties fields use
            // SingleTokenStream
            t = field.tokenStreamValue().next(t);
            String value = new String(t.termBuffer(),
              0, t.termLength());
            if (value.startsWith(namePrefix)) {
          // extract value
          value = value.substring(namePrefix
View Full Code Here

Examples of org.apache.lucene.document.Fieldable.tokenStreamValue()

          fieldState.offset += valueLength;
          fieldState.length++;
          fieldState.position++;
        } else {                                  // tokenized field
          final TokenStream stream;
          final TokenStream streamValue = field.tokenStreamValue();

          if (streamValue != null)
            stream = streamValue;
          else {
            // the field does not have a TokenStream,
View Full Code Here

Examples of org.apache.lucene.document.Fieldable.tokenStreamValue()

          fieldState.length++;
          fieldState.position++;
          anyToken = valueLength > 0;
        } else {                                  // tokenized field
          final TokenStream stream;
          final TokenStream streamValue = field.tokenStreamValue();

          if (streamValue != null)
            stream = streamValue;
          else {
            // the field does not have a TokenStream,
View Full Code Here

Examples of org.apache.lucene.document.NumericField.tokenStreamValue()

          serializer.addFieldWithSerializableReaderData( new LuceneFieldContext( safeField ) );
        }
        else if ( safeField.readerValue() != null )  {
          throw log.conversionFromReaderToStringNotYetImplemented();
        }
        else if ( safeField.tokenStreamValue() != null )  {
          serializer.addFieldWithTokenStreamData( new LuceneFieldContext( safeField ) );
        }
        else {
          throw log.unknownFieldType( safeField.getClass() );
        }
View Full Code Here

Examples of org.apache.lucene.document.NumericField.tokenStreamValue()

          serializer.addFieldWithSerializableReaderData( new LuceneFieldContext( safeField ) );
        }
        else if ( safeField.readerValue() != null ) {
          throw log.conversionFromReaderToStringNotYetImplemented();
        }
        else if ( safeField.tokenStreamValue() != null ) {
          serializer.addFieldWithTokenStreamData( new LuceneFieldContext( safeField ) );
        }
        else {
          throw log.unknownFieldType( safeField.getClass() );
        }
View Full Code Here

Examples of org.apache.lucene.document.NumericField.tokenStreamValue()

          serializer.addFieldWithSerializableReaderData( new LuceneFieldContext( safeField ) );
        }
        else if ( safeField.readerValue() != null )  {
          throw log.conversionFromReaderToStringNotYetImplemented();
        }
        else if ( safeField.tokenStreamValue() != null )  {
          serializer.addFieldWithTokenStreamData( new LuceneFieldContext( safeField ) );
        }
        else {
          throw log.unknownFieldType( safeField.getClass() );
        }
View Full Code Here

Examples of org.apache.lucene.document.NumericField.tokenStreamValue()

          serializer.addFieldWithSerializableReaderData( new LuceneFieldContext( safeField ) );
        }
        else if ( safeField.readerValue() != null ) {
          throw log.conversionFromReaderToStringNotYetImplemented();
        }
        else if ( safeField.tokenStreamValue() != null ) {
          serializer.addFieldWithTokenStreamData( new LuceneFieldContext( safeField ) );
        }
        else {
          throw log.unknownFieldType( safeField.getClass() );
        }
View Full Code Here

Examples of org.elasticsearch.common.lucene.all.AllField.tokenStreamValue()

        String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/all/mapping.json");
        DocumentMapper docMapper = MapperTests.newParser().parse(mapping);
        byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/all/test1.json");
        Document doc = docMapper.parse(json).rootDoc();
        AllField field = (AllField) doc.getFieldable("_all");
        AllEntries allEntries = ((AllTokenStream) field.tokenStreamValue()).allEntries();
        assertThat(allEntries.fields().size(), equalTo(3));
        assertThat(allEntries.fields().contains("address.last.location"), equalTo(true));
        assertThat(allEntries.fields().contains("name.last"), equalTo(true));
        assertThat(allEntries.fields().contains("simple1"), equalTo(true));
    }
View Full Code Here

Examples of org.elasticsearch.common.lucene.all.AllField.tokenStreamValue()

        DocumentMapper builtDocMapper = MapperTests.newParser().parse(builtMapping);
        byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/all/test1.json");
        Document doc = builtDocMapper.parse(json).rootDoc();

        AllField field = (AllField) doc.getFieldable("_all");
        AllEntries allEntries = ((AllTokenStream) field.tokenStreamValue()).allEntries();
        assertThat(allEntries.fields().size(), equalTo(3));
        assertThat(allEntries.fields().contains("address.last.location"), equalTo(true));
        assertThat(allEntries.fields().contains("name.last"), equalTo(true));
        assertThat(allEntries.fields().contains("simple1"), equalTo(true));
    }
View Full Code Here

Examples of org.elasticsearch.common.lucene.all.AllField.tokenStreamValue()

        String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/all/store-mapping.json");
        DocumentMapper docMapper = MapperTests.newParser().parse(mapping);
        byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/all/test1.json");
        Document doc = docMapper.parse(json).rootDoc();
        AllField field = (AllField) doc.getFieldable("_all");
        AllEntries allEntries = ((AllTokenStream) field.tokenStreamValue()).allEntries();
        assertThat(allEntries.fields().size(), equalTo(2));
        assertThat(allEntries.fields().contains("name.last"), equalTo(true));
        assertThat(allEntries.fields().contains("simple1"), equalTo(true));

        String text = field.stringValue();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.