Re: Indexing values of different datatype under same field

2016-11-04 Thread Kumaran Ramasubramanian
Hi Rajnish

It is not advisable to index values with two data types in a field.
Features like phrase query, sorting may break in those indexes.

related previous discussion :
http://www.gossamer-threads.com/lists/lucene/java-user/289159?do=post_view_flat#289159


-
Kumaran R








On Fri, Nov 4, 2016 at 8:30 AM, Rajnish kamboj 
wrote:

> Hi
>
> Is it advisable to store and index values of different datatype under same
> field as follows
>
> Field field = new LongField("*region*", 10L, Field.Store.YES);
> doc.add(field);
> Field field1 = new StringField("*region*", "NORTH", Field.Store.YES);
> doc.add(field1);
>
> Our field "region" can have numeric and string data types.
>
> Our query can have two patterns as under:
> #1 region="NORTH"
> #2 region in range 5 TO 20
>
> Though we are able to index and retrieve desired results but,
>
> *We could not find Lucene (5.3.1) documentation around this behavior.*
> Please comment on,
> 1. If we can go with this behavior and what would be the performance
> implication of indexing and querying different datatype under same field?
> 2. How the two are stored internally (i.e. different datatype under same
> field)?
> 2. If we upgrade to new Lucene version 5.4 or to major 6.0.0, then will the
> above behavior work or it may break?
>
>
> Regards
> Rajnish
>


RE: Lucene IndexSearcher PrefixQuery seach getting really slow after a while

2016-11-04 Thread Nir Barel
Try to optimize your indexes.

Sent securely from my iPhone

From: Jason Wu
Sent: Thursday, 3 November 2016 at 22:21:55
To: java-user@lucene.apache.org
Subject: Lucene IndexSearcher PrefixQuery seach getting really slow after a 
while

Hi Team,

We are using lucene 4.8.1 to do some info searches every day for years. 
However, recently we encounter some performance issues which greatly slow down 
the lucene search.

After application running for a while, we are facing below issues, which  
IndexSearcher PrefixQuery taking much longer time to search:

[cid:image002.png@01D235EC.3C063740]

Our cpu and memory are fine, no leak found:
[cid:image004.jpg@01D235EC.3C063740]


However, for the exactly same java instance we are running on another box,  for 
the same info we are searching, it is very fast.

I/O, memory, CPUS are all fine on both boxes.

So, do you know any reasons can cause this performance issue?

Thank you,
J.W



This e-mail, including accompanying communications and attachments, is strictly 
confidential and only for the intended recipient. Any retention, use or 
disclosure not expressly authorised by Markit is prohibited. This email is 
subject to all waivers and other terms at the following link: 
http://www.markit.com/en/about/legal/email-disclaimer.page

Please visit http://www.markit.com/en/about/contact/contact-us.page for contact 
information on our offices worldwide.
Email secured by Check Point
--ef.-1.1203814c8b95672f9c638a79d60fbb34.ef--