Examples of fields()


Examples of org.apache.lucene.index.AtomicReader.fields()

      Text key = new Text();
      int numberOfShards = _shardContext.getTableContext().getDescriptor().getShardCount();
      int shardId = BlurUtil.getShardIndex(shard);
      for (AtomicReaderContext context : leaves) {
        AtomicReader atomicReader = context.reader();
        Fields fields = atomicReader.fields();
        Terms terms = fields.terms(BlurConstants.ROW_ID);
        if (terms != null) {
          TermsEnum termsEnum = terms.iterator(null);
          BytesRef ref = null;
          while ((ref = termsEnum.next()) != null) {
View Full Code Here

Examples of org.apache.lucene.index.AtomicReader.fields()

  private void duellReaders(CompositeReader other, AtomicReader memIndexReader)
      throws IOException {
    AtomicReader competitor = SlowCompositeReaderWrapper.wrap(other);
    Fields memFields = memIndexReader.fields();
    for (String field : competitor.fields()) {
      Terms memTerms = memFields.terms(field);
      Terms iwTerms = memIndexReader.terms(field);
      if (iwTerms == null) {
        assertNull(memTerms);
      } else {
View Full Code Here

Examples of org.apache.lucene.index.AtomicReader.fields()

  private void duellReaders(CompositeReader other, AtomicReader memIndexReader)
      throws IOException {
    AtomicReader competitor = SlowCompositeReaderWrapper.wrap(other);
    Fields memFields = memIndexReader.fields();
    for (String field : competitor.fields()) {
      Terms memTerms = memFields.terms(field);
      Terms iwTerms = memIndexReader.terms(field);
      if (iwTerms == null) {
        assertNull(memTerms);
      } else {
View Full Code Here

Examples of org.apache.lucene.index.AtomicReader.fields()

    Set<String> fields = new TreeSet<String>();
    for (IndexReaderContext ctext : reader.getContext().leaves()) {
      AtomicReaderContext atomicReaderContext = (AtomicReaderContext) ctext;
      AtomicReader atomicReader = atomicReaderContext.reader();
      if (atomicReader instanceof SegmentReader) {
        for (String f : atomicReader.fields()) {
          fields.add(f);
        }
      }
    }
    return fields;
View Full Code Here

Examples of org.apache.lucene.index.LeafReader.fields()

        String fieldName = suggestionContext.getField();
        Map<String, CompletionSuggestion.Entry.Option> results = Maps.newHashMapWithExpectedSize(indexReader.leaves().size() * suggestionContext.getSize());
        for (LeafReaderContext atomicReaderContext : indexReader.leaves()) {
            LeafReader atomicReader = atomicReaderContext.reader();
            Terms terms = atomicReader.fields().terms(fieldName);
            if (terms instanceof Completion090PostingsFormat.CompletionTerms) {
                final Completion090PostingsFormat.CompletionTerms lookupTerms = (Completion090PostingsFormat.CompletionTerms) terms;
                final Lookup lookup = lookupTerms.getLookup(suggestionContext.mapper(), suggestionContext);
                if (lookup == null) {
                    // we don't have a lookup for this segment.. this might be possible if a merge dropped all
View Full Code Here

Examples of org.apache.lucene.index.SlowCompositeReaderWrapper.fields()

  private void duellReaders(CompositeReader other, AtomicReader memIndexReader)
      throws IOException {
    AtomicReader competitor = new SlowCompositeReaderWrapper(other);
    Fields memFields = memIndexReader.fields();
    for (String field : competitor.fields()) {
      Terms memTerms = memFields.terms(field);
      Terms iwTerms = memIndexReader.terms(field);
      if (iwTerms == null) {
        assertNull(memTerms);
      } else {
View Full Code Here

Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.fields()

        if (query != null) {
            return query;
        }

        MapperQueryParser queryParser;
        if (qpSettings.fields() != null) {
            if (qpSettings.fields().size() == 1) {
                qpSettings.defaultField(qpSettings.fields().get(0));
                queryParser = parseContext.singleQueryParser(qpSettings);
            } else {
                qpSettings.defaultField(null); // reset defaultField when using multi query parser
View Full Code Here

Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.fields()

            return query;
        }

        MapperQueryParser queryParser;
        if (qpSettings.fields() != null) {
            if (qpSettings.fields().size() == 1) {
                qpSettings.defaultField(qpSettings.fields().get(0));
                queryParser = parseContext.singleQueryParser(qpSettings);
            } else {
                qpSettings.defaultField(null); // reset defaultField when using multi query parser
                queryParser = parseContext.multiQueryParser(qpSettings);
View Full Code Here

Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.fields()

        }

        MapperQueryParser queryParser;
        if (qpSettings.fields() != null) {
            if (qpSettings.fields().size() == 1) {
                qpSettings.defaultField(qpSettings.fields().get(0));
                queryParser = parseContext.singleQueryParser(qpSettings);
            } else {
                qpSettings.defaultField(null); // reset defaultField when using multi query parser
                queryParser = parseContext.multiQueryParser(qpSettings);
            }
View Full Code Here

Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.fields()

                            }
                        }
                        if (fField == null) {
                            fField = parser.text();
                        }
                        if (qpSettings.fields() == null) {
                            qpSettings.fields(Lists.<String>newArrayList());
                        }

                        if (Regex.isSimpleMatchPattern(fField)) {
                            for (String field : parseContext.mapperService().simpleMatchToIndexNames(fField)) {
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.