Click here to Skip to main content
15,889,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have an issue while searching the Lucene (built in Azure Storage Blob) using SimpleFacetSearch and display each unique value in tree (with facet count)

Industry Tree Example:
SIC2(100)
SIC4(50)
SIC4(50)

Country Tree Example:
US (100)
VA (50)
DC (50)

etc

I stored the denormalized table's index built in Lucene

Any ideas would be appreciated.

Thanks,
Jay

What I have tried:

_query = New MatchAllDocsQuery("SIC2_Code")

sfs = New SimpleFacetedSearch(_Reader, "SIC2_Code") 'Search SIC 2 Code
hits = sfs.Search(_query, 1000000000)
totalHits = hits.TotalHitCount

For Each hpf In hits.HitsPerFacet
hitCountPerGroup = hpf.HitCount

For Each doc As Document In hpf.Documents
SIC2 = doc.GetField("SIC2_Code").StringValue
SIC4 = doc.GetField("SIC4_Code").StringValue
SIC2Desc = doc.GetField("SIC2Desc").StringValue
SIC4Desc = doc.GetField("SIC4Desc").StringValue

'Add nodes to Tree
Next
Next


_query = New MatchAllDocsQuery("Country")

sfs = New SimpleFacetedSearch(_Reader, "Country") 'Search Country
hits = sfs.Search(_query, 1000000000)
totalHits = hits.TotalHitCount

For Each hpf In hits.HitsPerFacet
hitCountPerGroup = hpf.HitCount
For Each doc As Document In hpf.Documents
State = doc.GetField("StateCode").StringValue

'Add nodes to Tree
Next
Next
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900