Package org.apache.lucene.index

Examples of org.apache.lucene.index.TermFreqVector


   */
  public PriorityQueue<Object[]> retrieveTerms(int docNum) throws IOException {
    Map<String,Int> termFreqMap = new HashMap<String,Int>();
    for (int i = 0; i < fieldNames.length; i++) {
      String fieldName = fieldNames[i];
      TermFreqVector vector = ir.getTermFreqVector(docNum, fieldName);
     
      // field does not store term vector info
      if (vector == null) {
        Document d = ir.document(docNum);
        String text[] = d.getValues(fieldName);
View Full Code Here


                        }
                    }
                }
                separator = " ";
            }
            TermFreqVector tfv = reader.getTermFreqVector(
                    docNumber, FieldNames.FULLTEXT);
            if (tfv instanceof TermPositionVector) {
                return createExcerpt((TermPositionVector) tfv, text.toString(),
                        maxFragments, maxFragmentSize);
            } else {
View Full Code Here

     */
    private PriorityQueue retrieveTerms(int docNum) throws IOException {
        Map termFreqMap = new HashMap();
        for (int i = 0; i < fieldNames.length; i++) {
            String fieldName = fieldNames[i];
            TermFreqVector vector = ir.getTermFreqVector(docNum, fieldName);

            // field does not store term vector info
            if (vector == null) {
                Document d = ir.document(docNum);
                String[] text = d.getValues(fieldName);
View Full Code Here

     */
    public PriorityQueue retrieveTerms(int docNum) throws IOException {
        Map termFreqMap = new HashMap();
        for (int i = 0; i < fieldNames.length; i++) {
            String fieldName = fieldNames[i];
            TermFreqVector vector = ir.getTermFreqVector(docNum, fieldName);

            // field does not store term vector info
            if (vector == null) {
                Document d = ir.document(docNum);
                String[] text = d.getValues(fieldName);
View Full Code Here

     */
    public PriorityQueue retrieveTerms(int docNum) throws IOException {
        Map<String, Int> termFreqMap = new HashMap<String, Int>();
        for (int i = 0; i < fieldNames.length; i++) {
            String fieldName = fieldNames[i];
            TermFreqVector vector = ir.getTermFreqVector(docNum, fieldName);

            // field does not store term vector info
            if (vector == null) {
                Document d = ir.document(docNum);
                String[] text = d.getValues(fieldName);
View Full Code Here

                }
                text.append(separator);
                text.append(fields[i].stringValue());
                separator = " ";
            }
            TermFreqVector tfv = reader.getTermFreqVector(
                    docNumber, FieldNames.FULLTEXT);
            if (tfv instanceof TermPositionVector) {
                return createExcerpt((TermPositionVector) tfv, text.toString(),
                        maxFragments, maxFragmentSize);
            } else {
View Full Code Here

                        }
                    }
                }
                separator = " ";
            }
            TermFreqVector tfv = reader.getTermFreqVector(
                    docNumber, FieldNames.FULLTEXT);
            if (tfv instanceof TermPositionVector) {
                return createExcerpt((TermPositionVector) tfv, text.toString(),
                        maxFragments, maxFragmentSize);
            } else {
View Full Code Here

     */
    private PriorityQueue retrieveTerms(int docNum) throws IOException {
        Map termFreqMap = new HashMap();
        for (int i = 0; i < fieldNames.length; i++) {
            String fieldName = fieldNames[i];
            TermFreqVector vector = ir.getTermFreqVector(docNum, fieldName);

            // field does not store term vector info
            if (vector == null) {
              Document d=ir.document(docNum);
              String text[]=d.getValues(fieldName);
View Full Code Here

                        text.deleteCharAt(j);
                    }
                }
                separator = " ";
            }
            TermFreqVector tfv = reader.getTermFreqVector(
                    docNumber, FieldNames.FULLTEXT);
            if (tfv instanceof TermPositionVector) {
                return createExcerpt((TermPositionVector) tfv, text.toString(),
                        maxFragments, maxFragmentSize);
            } else {
View Full Code Here

     
      // verify vectors result
      verifyVectors(vectors, docId);
     
      start = System.currentTimeMillis();
      TermFreqVector vector = reader.getTermFreqVector(docId, "field");
      timeElapsed += System.currentTimeMillis()-start;
     
      vectors = new TermFreqVector[1];
      vectors[0] = vector;
     
View Full Code Here

TOP

Related Classes of org.apache.lucene.index.TermFreqVector

Copyright © 2018 www.massapicom. 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.