FieldSelector support for Querydsl lucene

Bug #734703 reported by Lassi Immonen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

Lucene allows to pass FieldSelector class that can be used to select which fields are actually loaded from the disk. This needs to be passed as argument to Searcher.doc(int, FieldSelector).

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Maybe this could be supported via a parameter to the projection method :

  query.list(FieldSelector)

Additionally this could also be supported via a list of fields to be loaded as Querydsl expressions :

  query.list(prop1, prop2, prop3);

The second approach would support only the LOAD and NO_LOAD options

Revision history for this message
Lassi Immonen (lassi-immonen) wrote :

I think the first version is anyway needed, the second could be nice option.

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Support has been added :

    /**
     * Set the given FieldSelector to the query
     *
     * @param fieldSelector
     * @return
     */
    public Q load(FieldSelector fieldSelector);

    /**
     * Load only the fields of the given paths
     *
     * @param paths
     * @return
     */
    @SuppressWarnings("unchecked")
    public Q load(Path<?>... paths);

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.0-beta3

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.