Class SearchEquivalenceTestBase

    • Constructor Detail

      • SearchEquivalenceTestBase

        public SearchEquivalenceTestBase()
    • Method Detail

      • randomTerm

        protected Term randomTerm()
        returns a term suitable for searching. terms are single characters in lowercase (a-z)
      • randomFilter

        protected Query randomFilter()
        Returns a random filter over the document set
      • assertSameSet

        public void assertSameSet​(Query q1,
                                  Query q2)
                           throws Exception
        Asserts that the documents returned by q1 are the same as of those returned by q2
        Throws:
        Exception
      • assertSubsetOf

        public void assertSubsetOf​(Query q1,
                                   Query q2)
                            throws Exception
        Asserts that the documents returned by q1 are a subset of those returned by q2
        Throws:
        Exception
      • assertSubsetOf

        protected void assertSubsetOf​(Query q1,
                                      Query q2,
                                      Query filter)
                               throws Exception
        Asserts that the documents returned by q1 are a subset of those returned by q2.

        Both queries will be filtered by filter

        Throws:
        Exception
      • assertSameScores

        protected void assertSameScores​(Query q1,
                                        Query q2)
                                 throws Exception
        Assert that two queries return the same documents and with the same scores.
        Throws:
        Exception
      • filteredQuery

        protected Query filteredQuery​(Query query,
                                      Query filter)