Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleZaawansowane wyszukiwanie (1)
		DocumentFinder documentFinder = FinderFactory.getDocumentFinder();

        List<IndexFilter> filters = new ArrayList<IndexFilter>();
        filters.add( new SimpleIndexFilter( 3L, date, FilterOperator.GT ) );//Greater then '>'
        filters.add( new SimpleIndexFilter( 1L, "%test%", FilterOperator.LIKE ) );//definiujemy operatory wyszukiwania 
        CountedResult<WfDocument> result = documentFinder.findByIndexes( filters, sorters, documentClassId, start, limit );

...

Powyższy przykład utworzy następujący warunek: idx_3 = > date OR idx_1 = '%test' OR ( idx_5 = 'abc' AND idx_2 = 555 )

...