Package org.compass.core

Examples of org.compass.core.CompassHit


    private void addHitsToRes(SearchResult res, CompassHitsOperations hits) {
        //
        // Turn results into SearchResults
        //
        for (int i = 0; i < hits.length(); i++) {
            CompassHit defaultCompassHit = hits.hit(i);

            // log.debug(i + " score: " + defaultCompassHit.getScore());
            // log.debug("alias: " + defaultCompassHit.getAlias());

            Object obj = defaultCompassHit.getData();
            // log.debug("DATA: " + defaultCompassHit.getData());

            if (obj instanceof User) {
                User usr = (User) obj;
                res.getUsers().add(usr);
View Full Code Here


    List processHits (ObjectContext context, CompassHits hits)
    {
        int count = Math.min(500, hits.length());
        List results = new ArrayList(count);
        for (int i=0; i < count; i++) {
            CompassHit hit = hits.hit(i);
            Object thinObj = hit.data();
            // ToDo:  PERFORMANCE!  This should be done in a batch fetch
            Object pk = context.getPrimaryKey(thinObj);
            Object fullObj = context.find(thinObj.getClass(), pk);
            results.add(fullObj);
        }
View Full Code Here

TOP

Related Classes of org.compass.core.CompassHit

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.