Re: Need change one field type from IntField to String including indexOptions to store positions & Norms
While Reindexing only am facing this problem. Just to confirm what do you mean by reindex. You mean "delete and add" for all documents by taking data one by one right?? Sent from Phone > On 17-Dec-2015, at 8:53 PM, Jack Krupansky wrote: > > The standard answer is that you need to reindex all of your data. > > -- Jack Krupansky > > On Thu, Dec 17, 2015 at 6:10 AM, Kumaran Ramasubramanian > wrote: > >> Dear All >> >> i am using lucene 4.10.4. Is there any more information i missed to >> provide? Please let me know. >> >> >> -- >> Kumaran R** >> >> >> >> >> On Wed, Dec 16, 2015 at 10:35 PM, Kumaran Ramasubramanian < >> kums@gmail.com> wrote: >> >>> >>> Hi All, >>> >>> Previous Post - >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159 >>> >>> i have indexed one field "STATUS" as both IntField & String field >> in >>> same index. Now i want to take IntField containing documents and change >> the >>> value of field "STATUS" to string with norms & positions ( to achieve >>> phrase query). >>> >>> But even if i delete that field and index again as String field, *STATUS >>> field property of "omitNorms & no positions" are not changing *( which >>> are set when it was IntField) >>> >>> There are around 2 million documents in that index. indexed STATUS field >>> as >>> IntField - in 1 million documents >>> Analyzed String Field - in another 1 million doucments >>> >>> Basically, am trying to change STATUS field into only one type ( to solve >>> http://www.gossamer-threads.com/lists/lucene/java-user/289159) >>> >>> >>> *In index when it was IntField* >>> >>> >>> >>> >>> >>> *when i try to change to string from IntField* >>> >>> stored,indexed,tokenized >>> >>> >>> >>> >>> *This is how STATUS field looks again in index* >>> >>> >>> index cleared> >>> >>> >>> >>> >>> *code details i am using:* >>> >>> for IntField, >>> IntField intField = new IntField("STATUS", Integer.parseInt(" >>> 222 >>> "), Field.Store.YES); >>> doc >>> ument >>> .add(intField); >>> >>> for string field, >>> document.add(new Field("STATUS", "lucene index cleared", >> Field.Store.YES, >>> Field.Index.ANALYZED)); >>> >>> >>> >>> Thanks in advance :-) >>> >>> >>> >>> -- >>> K >>> umaran >>> R >> - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Is housekeeping of Lucene indexes block index update but allow search ?
Hi Gaurav 1.When you opened index to write,till you close that index, there will be a lock to do further write. But not for search. During merge, index needs 3X ( not sure 2X?) of more storage space, i believe that is the reason for no blocking for search. ( any other experts can clarify you more on this ) 2. Merge will be taken care by default values( merge factor 2) of lucene. If u need to control more on merge policy, please go through about merge by size or by number of segments or many merge policies. Hope this will help you a little bit. -- Kumaran R Sent from Phone > On 04-Aug-2014, at 8:04 pm, Gaurav gupta wrote: > > Hi, > > We are planning to use Lucene 4.8.1 over Oracle (1 to 2 TB data) and > seeking information on "How Lucene conduct housekeeping or maintenance of > indexes over a period of time". *Is it a blocking operation for write and > search or it will not block anything while merging is going on? * > > I found :- *"Since Lucene adds the updated document to the index and marks > all previous versions as deleted. So to get rid of deleted documents Lucene > needs to do some housekeeping over a period of time. Under the hood is that > from time to time segments are merged into (usually) bigger segments > using configurable MergePolicy > <http://lucene.apache.org/java/3_4_0/api/core/org/apache/lucene/index/MergePolicy> > (TieredMergePolicy). > "* > > 1- Is it's a blocking operation for write and search both or it will not > block anything while merging is going on? > > 2- What is the best practice to avoid any blocking in production servers? > Not sure how Solr or Elasticsearch is handling it. > Should we control the merging by calling *forcemerge(int) at low traffic > time *to avoid any unpredictable blocking operation? Is it recommended or > Lucene do intelligent merging and don't block anything (updates and > searches) or there are ways to reduce the blocking time to a very small > duration (1 -2 minutes) using some API or demon thread etc. > > Looking for your professional guidance on it. > > Regards > Gaurav - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: How does Lucene decide which fields to index?
You should know two things to get this. 1.Indexed fields can be searched. 2.Stored fields can be fetched. Check your code whether you are storing all fields. -- Kumaran R Sent from Phone > On 04-Aug-2014, at 7:13 pm, Sachin Kulkarni wrote: > > Hi, > > I am using lucene 4.6.0 to index a dataset. > I have the following fields: > doctitle, docbody, docname, docid, date. > But when I access the fields using indexReader.getTermVectors(indexedDocID) > then I only get two fields > docbody and docname. > > How do I index so that I also get doctitle? > > Thank you. > > Regards, > Sachin Kulkarni - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org
Re: Doubt Regarding Lucene matchscore
Provide some more information like lucene version, sample code, parameters involved in indexing and searching. -- Kumaran R > On 18-Jul-2014, at 6:52 pm, Priyanka Tufchi > wrote: > > Hi All > > I am matching and ranking two set of Docs using apache lucene and I passes > page hits 1000. But in the result it shows 200 only why? > > It means that rest 800 are not matched and if so then what we should > consider if we are getting 0.00 score for any match . > > Waiting for reply > > Thanks > Priyanka - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org