主权项 |
1. A method for faceted classification, the method comprising:
receiving, by one or more computer processors, a search query; creating, by the one or more computer processors, a first table of facet value ranges, wherein facet value ranges are based, at least in part, on the search query, and wherein a first counter of search results associated with the facet value ranges is set to zero; fetching, by the one or more computer processors, a first search result corresponding to the search query; retrieving, by the one or more computer processors, a first facet value associated with the first search result; mapping, by the one or more computer processors, the first facet value to a first facet value range; determining, by the one or more computer processors, whether the first facet value range is in the first table of facet value ranges; responsive to determining the first facet value range is not in the first table of facet value ranges, inserting, by the one or more computer processors, the first facet value range into the first table of facet value ranges; responsive to inserting the first facet value range into the first table of facet value ranges, setting, by the one or more computer processors, a second counter of search results associated with the first facet value range to zero; responsive to setting the second counter of search results associated with the first facet value range to zero, increasing, by the one or more computer processors, the second counter of search results by one; responsive to inserting the first facet value range into the first table of facet value ranges, determining, by the one or more computer processors, whether a number of facet value ranges in the first table of facet value ranges is below a pre-defined threshold; responsive to determining the number of facet value ranges is not below the pre-defined threshold, creating, by the one or more computer processors, a second table of facet value ranges, wherein a resolution of facet value ranges in the second table of facet value ranges is more coarse than a resolution of facet value ranges in the first table of facet value ranges, and wherein a third counter of search results associated with the facet value ranges is set to zero; and identifying, by the one or more computer processors, a second facet value range that includes the first facet value range. |