Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextQuery always return no result #130

Open
chrno1209 opened this issue Sep 4, 2019 · 0 comments
Open

TextQuery always return no result #130

chrno1209 opened this issue Sep 4, 2019 · 0 comments

Comments

@chrno1209
Copy link

Can anyone tell me on how to setup to make TextQuery (with highlight) works?
I did follow setting up as below but not success:

/config/ExamineIndex.config

<ExamineLuceneIndexSets>
	<IndexSet SetName="MyLookIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/MyLookIndexSet/" />
</ExamineLuceneIndexSets>

/config/ExamineSettings.config

<Examine>
	<ExamineIndexProviders>
		<providers>
			<add name="MyLookIndexer" type="Our.Umbraco.Look.LookIndexer, Our.Umbraco.Look" />
		</providers>
	</ExamineIndexProviders>
	<ExamineSearchProviders>
		<providers>
			<add name="MyLookSearcher" type="Our.Umbraco.Look.LookSearcher, Our.Umbraco.Look" />
		</providers>
	</ExamineSearchProviders>
</Examine>

Searching

var lookQuery = new LookQuery("MyLookSearcher");
lookQuery.NodeQuery = new NodeQuery() {
  Type = PublishedItemType.Content
};
lookQuery.TextQuery = new TextQuery()
{
    SearchText = searchQuery,
    GetHighlight = true
};

The result always return 0 while I checked in Look backoffice for the index, it has data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant