Uploaded image for project: 'YesCart'
  1. YesCart
  2. YC-114

Invalid implementation of product search with respect to category rank

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: sf server
    • Labels:
      None

      Description

      Lucene uses complex ranking using search results and field boosts - using sorting in lucene query is NOT a valid approach.
      Category ranking should add to Boost! not sorting since we would like to increate the probability of the product to be in the top search results. Adding sorting kills all that statistical calculation and hence defies the point of having full search index!

      We should NEVER use sorting in full text queries (maybe only in YUM)

      SortableProductDataProvider
      } else {
      products = decorate(productService.getProductByQuery(
      query,
      first,
      count,
      sortFieldName,
      reverse));

      GenericDAOHibernateImpl

      public List<T> fullTextSearch(final org.apache.lucene.search.Query query,
      final int firtsResult,
      final int maxResults,
      final String sortFieldName,

      final boolean reverse) {
      if (null != getPersistentClass().getAnnotation(org.hibernate.search.annotations.Indexed.class)) {
      FullTextSession fullTextSession = Search.getFullTextSession(sessionFactory.getCurrentSession());
      FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(query, getPersistentClass());
      if (sortFieldName != null)

      { org.apache.lucene.search.Sort sort = new org.apache.lucene.search.Sort( new org.apache.lucene.search.SortField(sortFieldName, SortField.STRING, reverse)); fullTextQuery.setSort(sort); }

        Attachments

          Activity

            People

            • Assignee:
              denis Denis Pavlov
              Reporter:
              denis Denis Pavlov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: