Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Truncate (0.03 sec)

  1. src/main/java/org/codelibs/fess/suggest/util/SuggestUtil.java

         * Creates a unique identifier for the given text by encoding it to a Base64 string.
         * If the encoded string exceeds the maximum allowed length, it truncates the string
         * to the specified maximum length.
         *
         * @param text the input text to be encoded
         * @return the encoded string, truncated if necessary
         */
        public static String createSuggestTextId(final String text) {
    Registered: Fri Sep 19 09:08:11 UTC 2025
    - Last Modified: Mon Sep 01 13:33:03 UTC 2025
    - 17.4K bytes
    - Viewed (1)
  2. src/test/java/org/codelibs/fess/suggest/util/SuggestUtilTest.java

            }
            String longText = sb.toString();
            String id = SuggestUtil.createSuggestTextId(longText);
            assertNotNull(id);
            assertEquals(445, id.length()); // Should be truncated to ID_MAX_LENGTH
        }
    
        @Test
        public void testParseQuery() {
            // Test normal query
            String query = "test query";
            String field = "content";
    Registered: Fri Sep 19 09:08:11 UTC 2025
    - Last Modified: Mon Sep 01 13:33:03 UTC 2025
    - 18.2K bytes
    - Viewed (0)
Back to top