SearchServiceImpl implements SearchService { @Override public SearchResult search(final SearchQuery sq) { try { return doSearch(sq); } catch (final LuceneSearchException ex) { throw new TranslatedException(ex, "search_invalid"); } } @Inject  SearchServiceImpl(final JSwordSearchService jswordSearch,
                             final JSwordMetadataService jswordMetadata,
                             final JSwordVersificationService versificationService,
                             final SubjectSearchService subjects, final TimelineService timeline,
                             final BibleInformationService bibleInfoService,
                             final EntityManager entityManager,
                             final VersionResolver versionResolver,
                             final LexiconDefinitionService lexiconDefinitionService,
                             final JSwordRelatedVersesService relatedVerseService,
                             final StrongAugmentationService strongAugmentationService); @Override long estimateSearch(final SearchQuery sq); @Override AbstractComplexSearch runQuery(final List<SearchToken> searchTokens, final String options,
                                          final String display, final int page, final String filter,
                                          final String sort, int context, final String originalItems, final String userLanguage); @Override SearchResult search(final SearchQuery sq); static final String VOCABULARY_SORT; static final Pattern AUGMENTED_STRONG; static final Pattern ALL_STRONGS; static final Object ORIGINAL_SPELLING_SORT; }
@Test public void testMultiVersionSearch() { final List<SearchEntry> results = this.searchServiceUnderTest.search( new SearchQuery("t=elijah", new String[]{"ESV_th", "KJV", "ASV"}, "false", 0, 1, 1, null)).getResults(); assertFalse(results.isEmpty()); }
@Test public void testSubjectSearch() { final SearchResult searchSubject = this.searchServiceUnderTest.search( new SearchQuery("sh=elijah", new String[]{"ESV_th"}, "false", 0, 1, 1, null)); final List<SearchEntry> entries = ((SubjectHeadingSearchEntry) searchSubject.getResults().get(0)) .getHeadingsSearch().getResults(); for (final SearchEntry e : entries) { LOGGER.debug(((VerseSearchEntry) e).getPreview()); } assertTrue(searchSubject.getResults().size() > 0); }