Examples of createTerm()


Examples of org.apache.lucene.index.Term.createTerm()

                if (t == null) {
                    return t;
                }
                if (t.field().equals(FieldNames.PROPERTIES)) {
                    String text = t.text();
                    return t.createTerm(text.replace(oldSepChar, '['));
                } else {
                    return t;
                }
            }
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

        {
          term = new Term(fieldName, termAtt.term());
        } else
        {
//           create from previous to save fieldName.intern overhead
          term = term.createTerm(termAtt.term());
        }
        bq.add(new BooleanClause(new TermQuery(term),BooleanClause.Occur.SHOULD));
      }
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

        {
          term = new Term(fieldName, termAtt.term());
        } else
        {
//           create from previous to save fieldName.intern overhead
          term = term.createTerm(termAtt.term());
        }
        tf.addTerm(term);
      }
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                TermDocs tDocs = reader.termDocs();
                try {
                    ItemStateManager ism = getContext().getItemStateManager();
                    for (NodeId id : removedIds) {
                        aggregateIds =
                            aggregateIds.createTerm(id.toString());
                        tDocs.seek(aggregateIds);
                        while (tDocs.next()) {
                            Document doc = reader.document(
                                    tDocs.doc(), FieldSelectors.UUID);
                            NodeId nId = new NodeId(doc.get(FieldNames.UUID));
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

    List<String> terms = StrUtils.splitSmart(termList, ",", true);
    NamedList res = new NamedList();
    Term t = new Term(field);
    for (String term : terms) {
      String internal = ft.toInternal(term);
      int count = searcher.numDocs(new TermQuery(t.createTerm(internal)), base);
      res.add(term, count);
    }
    return res;   
  }
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

        //These are spelled the same, continue on
        continue;
      }

      if (options.extendedResults == true && reader != null && field != null) {
        term = term.createTerm(tokenText);
        result.addFrequency(token, reader.docFreq(term));
        int countLimit = Math.min(options.count, suggestions.length);
        if(countLimit>0)
        {
          for (int i = 0; i < countLimit; i++) {
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

        result.addFrequency(token, reader.docFreq(term));
        int countLimit = Math.min(options.count, suggestions.length);
        if(countLimit>0)
        {
          for (int i = 0; i < countLimit; i++) {
            term = term.createTerm(suggestions[i]);
            result.add(token, suggestions[i], reader.docFreq(term));
          }
        } else if(shardRequest) {
          List<String> suggList = Collections.emptyList();
          result.add(token, suggList);
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                TermDocs tDocs = reader.termDocs();
                try {
                    ItemStateManager ism = getContext().getItemStateManager();
                    for (NodeId id : removedIds) {
                        aggregateIds =
                            aggregateIds.createTerm(id.toString());
                        tDocs.seek(aggregateIds);
                        while (tDocs.next()) {
                            Document doc = reader.document(
                                    tDocs.doc(), FieldSelectors.UUID);
                            NodeId nId = new NodeId(doc.get(FieldNames.UUID));
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

                TermDocs tDocs = reader.termDocs();
                try {
                    ItemStateManager ism = getContext().getItemStateManager();
                    for (NodeId id : removedIds) {
                        aggregateIds =
                            aggregateIds.createTerm(id.toString());
                        tDocs.seek(aggregateIds);
                        while (tDocs.next()) {
                            Document doc = reader.document(
                                    tDocs.doc(), FieldSelectors.UUID);
                            NodeId nId = new NodeId(doc.get(FieldNames.UUID));
View Full Code Here

Examples of org.apache.lucene.index.Term.createTerm()

        //These are spelled the same, continue on
        continue;
      }

      if (extendedResults == true && reader != null && field != null) {
        term = term.createTerm(tokenText);
        result.add(token, reader.docFreq(term));
        int countLimit = Math.min(count, suggestions.length);
        for (int i = 0; i < countLimit; i++) {
          term = term.createTerm(suggestions[i]);
          result.add(token, suggestions[i], reader.docFreq(term));
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.