Documentation
¶
Index ¶
- func TestFindByID(t *testing.T, idx index.Indexer)
- func TestIndexDocument(t *testing.T, idx index.Indexer)
- func TestIndexDoesNotOverridePageRank(t *testing.T, idx index.Indexer)
- func TestMatchSearch(t *testing.T, idx index.Indexer)
- func TestMatchSearchWithOffset(t *testing.T, idx index.Indexer)
- func TestPhraseSearch(t *testing.T, idx index.Indexer)
- func TestUpdateScore(t *testing.T, idx index.Indexer)
- func TestUpdateScoreForUnknownDocument(t *testing.T, idx index.Indexer)
- type Suite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestFindByID ¶
TestFindByID verifies the document lookup logic.
func TestIndexDocument ¶
TestIndexDocument verifies the indexing logic for new and existing documents.
func TestMatchSearch ¶
TestMatchSearch verifies the document search logic when searching for keyword matches.
func TestMatchSearchWithOffset ¶
TestMatchSearchWithOffset verifies the document search logic when searching for keyword matches and skipping some results.
func TestPhraseSearch ¶
TestPhraseSearch verifies the document search logic when searching for exact phrases.
func TestUpdateScore ¶
TestUpdateScore checks that PageRank score updates work as expected.
Types ¶
type Suite ¶
type Suite struct { Idx index.Indexer // Optional helper functions. BeforeEach func(t *testing.T) AfterEach func(t *testing.T) }
Suite defines a re-usable set of index-related tests that can be executed against any type that implements index.Indexer.
func (*Suite) TestIndexer ¶
TestIndexer runs all the below functions on the index.