Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for SuggestItem (0.16 sec)

  1. src/main/java/org/codelibs/fess/suggest/entity/SuggestItem.java

            }
            return list.toArray(new Kind[list.size()]);
        }
    
        public static SuggestItem merge(final SuggestItem item1, final SuggestItem item2) {
            if (!item1.getId().equals(item2.getId())) {
                throw new IllegalArgumentException("Item id is mismatch.");
            }
    
            final SuggestItem mergedItem = new SuggestItem();
    
            mergedItem.id = item1.getId();
            mergedItem.text = item1.getText();
    
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Sat Oct 12 00:10:39 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/suggest/index/writer/SuggestWriter.java

        default SuggestItem[] mergeItems(final SuggestItem[] items) {
            final Set<String> mergedIdSet = new HashSet<>();
            final List<SuggestItem> mergedList = new ArrayList<>(items.length);
    
            for (final SuggestItem item1 : items) {
                final String item1Id = item1.getId();
                if (mergedIdSet.contains(item1Id)) {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/fess/suggest/index/contents/DefaultContentsParserTest.java

            QueryLog queryLog = new QueryLog("content:検索エンジン", null);
            List<SuggestItem> items = defaultContentsParser.parseQueryLog(queryLog, supportedFields, tagFieldNames, roleFieldName,
                    createDefaultReadingConverter(), createDefaultNormalizer());
            SuggestItem item = items.get(0);
            assertEquals("検索エンジン", item.getText());
            assertEquals(SuggestItem.Kind.QUERY, item.getKinds()[0]);
            assertEquals(1, item.getQueryFreq());
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/suggest/request/suggest/SuggestResponse.java

    import org.codelibs.fess.suggest.entity.SuggestItem;
    import org.codelibs.fess.suggest.request.Response;
    
    public class SuggestResponse implements Response {
        protected final String index;
    
        protected final long tookMs;
    
        protected final List<String> words;
    
        protected final int num;
    
        protected final long total;
    
        protected final List<SuggestItem> items;
    
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Sat Oct 12 00:10:39 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/suggest/index/SuggestIndexer.java

        public SuggestIndexResponse index(final SuggestItem item) {
            return index(new SuggestItem[] { item });
        }
    
        // TODO return result
        public SuggestIndexResponse index(final SuggestItem[] items) {
            // TODO parallel?
            final SuggestItem[] array = Stream.of(items).filter(item -> !item.isBadWord(badWords)).toArray(n -> new SuggestItem[n]);
    
            try {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Sat Oct 12 00:10:39 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/suggest/SuggesterTest.java

                items.add(new SuggestItem(new String[] { "マルチワード" + i, "fuga" }, readings, new String[] { "content" }, 0, 15 + i, -1, tags,
                        roles, null, SuggestItem.Kind.QUERY));
            }
    
            return items.toArray(new SuggestItem[items.size()]);
        }
    
        private SuggestItem[] getItemSet2() {
            List<SuggestItem> items = new ArrayList<>();
    
            {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 37K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/suggest/index/contents/DefaultContentsParser.java

                    items.add(new SuggestItem(words, readings, new String[] { field }, 0, 1, -1, tags, roles, null, SuggestItem.Kind.QUERY));
                }
            } catch (final IOException e) {
                throw new SuggesterException("Failed to create SuggestItem from queryLog.", e);
            }
    
            return items;
        }
    
        @Override
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/suggest/request/popularwords/PopularWordsResponse.java

    import org.codelibs.fess.suggest.entity.SuggestItem;
    import org.codelibs.fess.suggest.request.Response;
    
    public class PopularWordsResponse implements Response {
        protected final String index;
    
        protected final long tookMs;
    
        protected final List<String> words;
    
        protected final int num;
    
        protected final long total;
    
        protected final List<SuggestItem> items;
    
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Sat Oct 12 00:10:39 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/suggest/index/contents/ContentsParser.java

    import org.codelibs.fess.suggest.converter.ReadingConverter;
    import org.codelibs.fess.suggest.entity.SuggestItem;
    import org.codelibs.fess.suggest.index.contents.querylog.QueryLog;
    import org.codelibs.fess.suggest.normalizer.Normalizer;
    
    public interface ContentsParser {
        SuggestItem parseSearchWords(String[] words, String[][] readings, String[] fields, String[] tags, String roles[], long score,
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/suggest/index/writer/SuggestIndexWriter.java

                final boolean update) {
            final BulkRequestBuilder bulkRequestBuilder = client.prepareBulk();
    
            final SuggestItem[] mergedItems = mergeItems(items);
            if (mergedItems.length == 0) {
                return new SuggestWriterResult();
            }
    
            for (final SuggestItem item : mergedItems) {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top