From b4a8d95d0d01e6765e6b3cf88f7abe28319d1b1b Mon Sep 17 00:00:00 2001 From: obfromevi Date: Wed, 10 Dec 2025 16:50:35 +0100 Subject: [PATCH] LUT-31455 : change Lucene index directory location --- .../service/docsearch/DocSearchService.java | 6 +++--- webapp/WEB-INF/conf/plugins/document.properties | 2 +- webapp/plugins/document/index/_r3.cfe | Bin 352 -> 0 bytes webapp/plugins/document/index/_r3.cfs | Bin 4476 -> 0 bytes webapp/plugins/document/index/_r3.si | Bin 398 -> 0 bytes webapp/plugins/document/index/segments_rr | Bin 157 -> 0 bytes webapp/plugins/document/index/write.lock | 0 7 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 webapp/plugins/document/index/_r3.cfe delete mode 100644 webapp/plugins/document/index/_r3.cfs delete mode 100644 webapp/plugins/document/index/_r3.si delete mode 100644 webapp/plugins/document/index/segments_rr delete mode 100644 webapp/plugins/document/index/write.lock diff --git a/src/java/fr/paris/lutece/plugins/document/service/docsearch/DocSearchService.java b/src/java/fr/paris/lutece/plugins/document/service/docsearch/DocSearchService.java index 2ce4fbe3..08c00631 100644 --- a/src/java/fr/paris/lutece/plugins/document/service/docsearch/DocSearchService.java +++ b/src/java/fr/paris/lutece/plugins/document/service/docsearch/DocSearchService.java @@ -120,7 +120,7 @@ public class DocSearchService public DocSearchService( ) { // Read configuration properties - _strIndex = AppPathService.getPath( PATH_INDEX ); + _strIndex = AppPropertiesService.getProperty( PATH_INDEX ); if ( ( _strIndex == null ) || ( _strIndex.equals( StringUtils.EMPTY ) ) ) { @@ -136,7 +136,7 @@ public DocSearchService( ) try { - _analyzer = (Analyzer) Class.forName( strAnalyserClassName ).newInstance( ); + _analyzer = (Analyzer) Class.forName( strAnalyserClassName ).getDeclaredConstructor( ).newInstance( ); } catch ( Exception e ) { @@ -156,7 +156,7 @@ public DocSearchService( ) * @deprecated Use {@code @Inject} to obtain the {@link DocSearchService} * instance. This method will be removed in future versions. */ - @Deprecated( since = "8.0", forRemoval = true ) + @Deprecated( since = "6.0", forRemoval = true ) public static DocSearchService getInstance( ) { return CDI.current( ).select( DocSearchService.class ).get( ); diff --git a/webapp/WEB-INF/conf/plugins/document.properties b/webapp/WEB-INF/conf/plugins/document.properties index f4b116f3..69b2ef0d 100644 --- a/webapp/WEB-INF/conf/plugins/document.properties +++ b/webapp/WEB-INF/conf/plugins/document.properties @@ -25,7 +25,7 @@ document.metadata.handler.dublincore.beanName=document.metadataDublinCore document.metadata.handler.dublincore.description=Dublin Core # internal document search -document.docsearch.lucene.indexPath=/plugins/document/index +document.docsearch.lucene.indexPath=java.io.tmpdir/plugins/document/index document.docsearch.lucene.writer.mergeFactor=20 document.docsearch.lucene.writer.maxFieldLength=1000000 document.docsearch.lucene.analyser.className=fr.paris.lutece.plugins.lucene.service.analyzer.LuteceFrenchAnalyzer diff --git a/webapp/plugins/document/index/_r3.cfe b/webapp/plugins/document/index/_r3.cfe deleted file mode 100644 index 9abb241be91c6e9550009be87d5d626d2df27a25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmcD&o+B>qQ<|KbmuhO@oS$2eUz(TVnpaYknOe*M1PM0Lp|k!Po}d}k*P zMQY~uX1|^J=9~F`^Ucg}&i>IKFJ106S%=l^=Yn=O=yh7>-PlEtzH$1iU;M#;CMTZx z-ivo`fB%(x=qzZDCE6!y7d_^;qD!3?Te;L)d8Gbt4t?h@yn?5%xhoUA{Y2XScq52n zud@_=DfD6%!WSsv?Ohsu?XTOIkSxL&Uhv48mLJJKl|L|&&*w*xri~y%5S3&}*EL*>NSp7g9fsqf9|pqWv0rL0WqilR_e11m(;Ku`?D z7!^_(K7;_JTmxgFgvODqYMQD+UMv!->q3MgP)drS1|DdjX{K3F4OQ1C)IEl(s#Mc* zID^c*xzBtmZ<;1Ii3wNDXoj&{o62aKCUEO#7%FA>kQ71~(l(x?#LUTybW*nz>>U#avTIHF;&CfLs9zJpQ@~LwdF3f-7BLf*#yJFWWRokv> zxL#JD4Hmqm&Miwvt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