Package net.yacy.search.ranking

Examples of net.yacy.search.ranking.RankingProfile


        final HandleSet queryhashes = QueryParams.hashes2Set(query);
        final HandleSet excludehashes = (exclude.length() == 0) ? new HandleSet(WordReferenceRow.urlEntryRow.primaryKeyLength, WordReferenceRow.urlEntryRow.objectOrder, 0) : QueryParams.hashes2Set(exclude);
        final long timestamp = System.currentTimeMillis();

      // prepare a search profile
        final RankingProfile rankingProfile = (profile.length() == 0) ? new RankingProfile(ContentDomain.contentdomParser(contentdom)) : new RankingProfile("", profile);

        // prepare an abstract result
        final StringBuilder indexabstract = new StringBuilder(6000);
        int indexabstractContainercount = 0;
        int joincount = 0;
View Full Code Here


            if (!MemoryControl.request(8000000L, false)) {
                indexSegment.urlMetadata().clearCache();
                SearchEventCache.cleanupEvents(true);
            }

            final RankingProfile ranking = sb.getRanking();
            final StringBuilder modifier = new StringBuilder(20);

            if (querystring.indexOf("/near",0) >= 0) {
              querystring = querystring.replace("/near", "");
              ranking.coeff_worddistance = RankingProfile.COEFF_MAX;
View Full Code Here

    private static SearchEvent dummyEvent = null;

    private static SearchEvent getDummyEvent(final WorkTables workTables, final LoaderDispatcher loader, final Segment indexSegment) {
        Log.logWarning("SearchEventCache", "returning dummy event");
        if (dummyEvent != null) return dummyEvent;
        final QueryParams query = new QueryParams("", 0, null, indexSegment, new RankingProfile(ContentDomain.TEXT), "");
        dummyEvent = new SearchEvent(query, null, workTables, null, false, loader, 0, 0, 0, 0, false);
        return dummyEvent;
    }
View Full Code Here

        // case if no values are requested
        if (post == null || sb == null) {
            // we create empty entries for template strings
            final serverObjects prop = defaultValues();
            final RankingProfile ranking;
            if (sb == null) ranking = new RankingProfile(ContentDomain.TEXT);
            else ranking = sb.getRanking();
            putRanking(prop, ranking, "local");
            return prop;
        }

        if (post.containsKey("EnterRanking")) {
            final RankingProfile ranking = new RankingProfile("local", post.toString());
            sb.setConfig("rankingProfile", crypt.simpleEncode(ranking.toExternalString()));
            final serverObjects prop = defaultValues();
            //prop.putAll(ranking.toExternalMap("local"));
            putRanking(prop, ranking, "local");
            return prop;
        }

        if (post.containsKey("ResetRanking")) {
            sb.setConfig("rankingProfile", "");
            final RankingProfile ranking = new RankingProfile(ContentDomain.TEXT);
            final serverObjects prop = defaultValues();
            //prop.putAll(ranking.toExternalMap("local"));
            putRanking(prop, ranking, "local");
            return prop;
        }

        final RankingProfile localRanking = new RankingProfile("local", post.toString());
        final serverObjects prop = new serverObjects();
        putRanking(prop, localRanking, "local");
        prop.putAll(localRanking.toExternalMap("local"));

        return prop;
    }
View Full Code Here

        return this.crawlQueues.getURL(urlhash);
    }

    public RankingProfile getRanking() {
        return (getConfig("rankingProfile", "").length() == 0) ?
                  new RankingProfile(ContentDomain.TEXT) :
                  new RankingProfile("", crypt.simpleDecode(sb.getConfig("rankingProfile", ""), null));
    }
View Full Code Here

                                1000, // maxDistance,
                                true, //global,
                                16, // partitions,
                                "", args[1],
                                null, //secondarySearchSuperviser,
                                new RankingProfile(ContentDomain.TEXT), // rankingProfile,
                                null // constraint);
                        );
                        for (final URIMetadataRow link: result.links) {
                                System.out.println(link.metadata().url().toNormalform(true, false));
                                System.out.println(link.snippet());
View Full Code Here

TOP

Related Classes of net.yacy.search.ranking.RankingProfile

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.