Interface IndexTool

  • All Known Implementing Classes:
    IndexSQLTool

    public interface IndexTool
    Indexation interface
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String INDEX_LAST_SCAN
      System param to store last scan date of objects
      static java.lang.String ORIGIN
      Origin date for full rebuilds
      static java.lang.String TYPE_LUCENE
      Deprecated. 
      static java.lang.String TYPE_SQL
      Indexation with SQL
      static java.lang.String USE_SEARCH_INDEX
      System parameter to activate the indexation
    • Method Summary

      Modifier and Type Method Description
      void delete​(java.lang.String object, java.lang.String row_id)
      Delete object index
      int indexation​(com.simplicite.objects.System.ObjectIndex index, Grant g, boolean reset)
      Bulk indexation of every indexed fields (take several minutes/hours for huge model)
      void indexation​(ObjectDB obj)
      Single object indexation
      SearchResult search​(Grant g, java.lang.String query, int pageNum, int pageSize)
      Global search (any object)
      SearchResult search​(Grant g, java.lang.String object, java.lang.String input, java.lang.String query, int pageNum, int pageSize, java.lang.String context)
      Field search (useful for field completion)
      SearchResult search​(Grant g, java.util.List<java.lang.String> objects, java.lang.String query, int pageNum, int pageSize)
      Object search (listed objects)
      SearchResult searchDoc​(Grant g, java.lang.String query, java.util.List<java.lang.String> bookshelfs, java.util.Map<java.lang.String,​java.lang.String> filter, int max)
      Global document search
    • Field Detail

      • INDEX_LAST_SCAN

        static final java.lang.String INDEX_LAST_SCAN
        System param to store last scan date of objects
        See Also:
        Constant Field Values
      • ORIGIN

        static final java.lang.String ORIGIN
        Origin date for full rebuilds
        See Also:
        Constant Field Values
      • USE_SEARCH_INDEX

        static final java.lang.String USE_SEARCH_INDEX
        System parameter to activate the indexation
        See Also:
        Constant Field Values
      • TYPE_LUCENE

        @Deprecated
        static final java.lang.String TYPE_LUCENE
        Deprecated.
        Indexation with Apache Lucene
        See Also:
        Constant Field Values
    • Method Detail

      • delete

        void delete​(java.lang.String object,
                    java.lang.String row_id)
             throws java.lang.Exception
        Delete object index
        Parameters:
        object - Object name
        row_id - Record id
        Throws:
        java.lang.Exception
      • indexation

        int indexation​(com.simplicite.objects.System.ObjectIndex index,
                       Grant g,
                       boolean reset)
                throws java.lang.Exception
        Bulk indexation of every indexed fields (take several minutes/hours for huge model)
        Parameters:
        reset - true to rebuild all, false to replace/append to the existing index
        Returns:
        index size
        Throws:
        java.lang.Exception
      • indexation

        void indexation​(ObjectDB obj)
                 throws java.lang.Exception
        Single object indexation
        Parameters:
        obj - Business object (row_id must be selected)
        Throws:
        java.lang.Exception
      • search

        SearchResult search​(Grant g,
                            java.lang.String object,
                            java.lang.String input,
                            java.lang.String query,
                            int pageNum,
                            int pageSize,
                            java.lang.String context)
                     throws java.lang.Exception
        Field search (useful for field completion)
        Parameters:
        object - Object name
        input - Field input name
        query - Search query
        pageNum - Page number (0 = first page)
        pageSize - Page size
        context - search, list or form
        Returns:
        List of (score, value)
        Throws:
        java.lang.Exception
      • search

        SearchResult search​(Grant g,
                            java.util.List<java.lang.String> objects,
                            java.lang.String query,
                            int pageNum,
                            int pageSize)
                     throws java.lang.Exception
        Object search (listed objects)
        Parameters:
        objects - Object names
        query - Search query
        pageNum - Page number (0 = first page)
        pageSize - Page size
        Returns:
        List of (score, row_id, ukey)
        Throws:
        java.lang.Exception
      • search

        SearchResult search​(Grant g,
                            java.lang.String query,
                            int pageNum,
                            int pageSize)
                     throws java.lang.Exception
        Global search (any object)
        Parameters:
        query - Search query
        pageNum - Page number (0 = first page)
        pageSize - Page size
        Returns:
        List of (score, object, row_id, ukey, all)
        Throws:
        java.lang.Exception
      • searchDoc

        SearchResult searchDoc​(Grant g,
                               java.lang.String query,
                               java.util.List<java.lang.String> bookshelfs,
                               java.util.Map<java.lang.String,​java.lang.String> filter,
                               int max)
                        throws java.lang.Exception
        Global document search
        Parameters:
        query - Search query
        max - Max rows
        Returns:
        List of (docId, path, score)
        Throws:
        java.lang.Exception