Re: search any field name having a specific value

2017-03-17 Thread Lokesh Madan
May be, index the field names as metadata file. When when querying, first get 
list of alls fields and then shoot a query. You can do this 2 hop query, or 
else maintain some cache and then shoot a query.
> On Mar 17, 2017, at 11:53 AM, Cristian Lorenzetto 
>  wrote:
> 
> It permits to search in a predefined lists of fields that you have to know
> in advance. In my case i dont know what is the fieldname.
> maybe WildcardQuery?
> 
> 2017-03-17 19:30 GMT+01:00 Corbin, J.D. :
> 
>> ​You might take a look at MultiFieldQueryParser.  I believe it allows you
>> to search multiple index fields at the same time.
>> 
>> 
>> 
>> J.D. Corbin
>> 
>> Senior Research Engineer
>> 
>> Advanced Computing & Data Science Lab
>> 
>> 3075 W. Ray Road
>> Suite 200
>> Chandler, AZ 85226-2495
>> USA
>> 
>> 
>> M: (303) 912-0958
>> 
>> E: jd.cor...@pearson.com
>> 
>> Pearson
>> 
>> Always Learning
>> Learn more at www.pearson.com 
>> 
>> On Fri, Mar 17, 2017 at 11:05 AM, Cristian Lorenzetto <
>> cristian.lorenze...@gmail.com> wrote:
>> 
>>> it is possible create a query searching any document containing any field
>>> having value == X?
>>> 
>> 


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



Re: How to get the index last modification date ?

2017-04-08 Thread Lokesh Madan
Can’t you introduce the field ? It should be straight forward, an every time 
you update the index, make sure to update the field. IndexWriter has 
setCommitData api, which you can call overtime you update/flush the indices.

> On Apr 8, 2017, at 2:30 PM, Jean-Claude Dauphin  wrote:
> 
> Thank you Ahmet for the suggestion.
> 
> I checked the LukeRequestHandler.java code source and the it looks like
> this:
> 
> String s = reader.getIndexCommit().getUserData().get(
> SolrIndexWriter.COMMIT_TIME_MSEC_KEY);
>if (s != null) {
>  indexInfo.add("lastModified", new Date(Long.parseLong(s)));
>}
> 
> But this is the Solr code and not the Lucene code
> 
> public class SolrIndexWriter extends IndexWriter {
>
> 
>  /** Stored into each Lucene commit to record the
>   *  System.currentTimeMillis() when commit was called. */
>  public static final String COMMIT_TIME_MSEC_KEY = "commitTimeMSec";
> 
> And I don't find this map key into Lucene code. Otherwise I can test the
> following code
> 
> String s = indexReader.getIndexCommit().getUserData().get("
> commitTimeMSec");
>  if (s != null) {
>lastModified = new Date(Long.parseLong(s)).toString();
>  }
> 
> Thanks again Ahmet,
> 
> Jean-Claude
> 
> 
> 
> On Sat, Apr 8, 2017 at 10:31 PM, Ahmet Arslan 
> wrote:
> 
>> 
>> Hi Jean,
>> How about LukeRequest handler? Many of the information displayed on the
>> admin screen comes from it.https://wiki.apache.org/solr/LukeRequestHandler
>> 
>> Ahmet
>> On Sunday, April 9, 2017, 2:21:38 AM GMT+3, Jean-Claude Dauphin <
>> jc.daup...@gmail.com> wrote:
>> Hello,
>> 
>> I need to check the index last modification date to count the number of
>> indexed terms only if tthe index has changed.
>> 
>> Any idea or suggestion on how to do this.
>> 
>> Thank you in advance.
>> 
>> Best wishes,
>> 
>> --
>> Jean-Claude Dauphin
>>