Lucene supports *something*, but not from the query syntax (how odd is
that?)... what you can do is to subclass
LuceneFulltextQueryIndexService and @Override the formQuery method
with something like:

   @Override
   protected Query formQuery( String key, Object value )
   {
       if ( value instanceof org.apache.lucene.search.Query )
       {
           return ( Query ) value;
       }
       else
       {
           return super.formQuery( key, value );
       }
   }

and call your subclassed instance using:

   IndexService index = new MyFulltextIndexService( neo );
   index.getNodes( "myKey", new WildcardQuery( new Term( "myKey",
"*something*" ) ) );

That should work (WildcardQuery and Term are lucene classes).

2010/1/12 Zerony Zhao <[email protected]>:
> Hi,
>
> Now we have a solution on numeric searching. Would someone comment on
> leading wildcard ubstring search such as "*foo*" using
> LuceneFulltextQueryIndexService? Any easy way to do this?
>
> Zerony
>
> On Tue, Jan 12, 2010 at 12:56 AM, Peter Neubauer <
> [email protected]> wrote:
>
>> Zerony and Raul,
>> I added this quirk to the Wiki for future reference, feel free to
>> flesh it out,
>> http://wiki.neo4j.org/content/Indexing_with_IndexService#Range_queries
>>
>> Cheers,
>>
>> /peter neubauer
>>
>> COO and Sales, Neo Technology
>>
>> GTalk:      neubauer.peter
>> Skype       peter.neubauer
>> Phone       +46 704 106975
>> LinkedIn   http://www.linkedin.com/in/neubauer
>> Twitter      http://twitter.com/peterneubauer
>>
>> http://www.neo4j.org                - Relationships count.
>> http://gremlin.tinkerpop.com    - PageRank in 2 lines of code.
>> http://www.linkedprocess.org   - Computing at LinkedData scale.
>>
>>
>>
>> On Tue, Jan 12, 2010 at 5:24 AM, Raul Raja Martinez <[email protected]>
>> wrote:
>> > http://wiki.apache.org/lucene-java/SearchNumericalFields
>> _______________________________________________
>> Neo mailing list
>> [email protected]
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [[email protected]]
Neo Technology, www.neotechnology.com
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to