Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2708

Allow customizable bean mapping for QueryResponse.getBeans(..)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4, 3.1
    • None
    • clients - java
    • None

    Description

      The mechanism for getting beans is rather limited - only classes @Field-annotated fields.

      Imaging the following subprojects:

      • common
      • search

      And you want to reuse a class from common as a result from a solr search. You should either duplicate the structure or make common depend on solrj. Neither are desirable.

      So, my suggestion:

      • introduce a pluggable mechanism for bean resolution. Currently it is impossible - it uses private methods and private inner classes. (This will be useful for custom conversions, because the existing one fails in some cases where BeanUtils.copyProperties works.)
      • allow externalized (xml) configuration
      • allow detecting all fields, annotated or not (off by default)

      Attachments

        1. SOLR-2708.patch
          53 kB
          Chris Male
        2. SOLR-2708.patch
          18 kB
          Chris Male
        3. SOLR-2708.patch
          18 kB
          Chris Male
        4. SOLR-2708.patch
          17 kB
          Chris Male
        5. SOLR-2708-beanProperty.patch
          20 kB
          Chris Male
        6. SOLR-2708-beanProperty-valueBinder.patch
          58 kB
          Chris Male

        Issue Links

          Activity

            People

              Unassigned Unassigned
              glamdring Bozhidar Bozhanov
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: