Package org.apache.lucene.search

Examples of org.apache.lucene.search.ScoreDocComparator


                = SharedFieldCache.INSTANCE.getStringIndex(reader, field,
                        FieldNames.createNamedValue(propertyName, ""),
                        SharedFieldSortComparator.this,
                        createComparatorValues);

        return new ScoreDocComparator() {
            public final int compare(final ScoreDoc i, final ScoreDoc j) {
                final int fi = index.order[i.doc];
                final int fj = index.order[j.doc];
                if (fi < fj) {
                    return -1;
View Full Code Here


                                            String relPath)
            throws IOException {
        PathFactory factory = PathFactoryImpl.getInstance();
        Path p = factory.create(relPath);
        try {
            ScoreDocComparator simple = new SimpleScoreDocComparator(
                    reader, nsMappings.translatePath(p));
            if (p.getLength() == 1) {
                return simple;
            } else {
                return new CompoundScoreDocComparator(reader,
View Full Code Here

                    Name innerProperty,
                    Name outerProperty) throws IOException {
        super(inner);
        this.reader = reader;
        this.outerLookup = scs.newComparator(reader, outerProperty.toString());
        ScoreDocComparator comparator = scs.newComparator(reader, innerProperty.toString());
        ScoreNode[] nodes;
        // create lookup map
        while ((nodes = inner.nextScoreNodes()) != null) {
            Integer doc = new Integer(nodes[innerScoreNodeIndex].getDoc(reader));
            sDoc.doc = doc.intValue();
            Comparable value = comparator.sortValue(sDoc);
            if (value != null) {
                innerScoreNodes.addScoreNodes(value, nodes);
            }
        }
    }
View Full Code Here

   {

      try
      {
         QPath p = locationFactory.parseJCRPath(relPath).getInternalPath();
         ScoreDocComparator simple = new SimpleScoreDocComparator(reader, nsMappings.translatePath(p));
         if (p.getEntries().length == 1)
         {
            return simple;
         }
         else
View Full Code Here

   {

      try
      {
         QPath p = locationFactory.parseJCRPath(relPath).getInternalPath();
         ScoreDocComparator simple = new SimpleScoreDocComparator(reader, nsMappings.translatePath(p));
         if (p.getEntries().length == 1)
         {
            return simple;
         }
         else
View Full Code Here

   {

      try
      {
         QPath p = locationFactory.parseJCRPath(relPath).getInternalPath();
         ScoreDocComparator simple = new SimpleScoreDocComparator(reader, nsMappings.translatePath(p));
         if (p.getEntries().length == 1)
         {
            return simple;
         }
         else
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.ScoreDocComparator

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.