Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
f77956e
Convert to record
LoayGhreeb Sep 20, 2024
0219ddf
Add embedded-postgres dependency
LoayGhreeb Sep 20, 2024
7602020
Merge branch 'main' into postgresql
LoayGhreeb Sep 21, 2024
351d01c
Setup embedded postgre server
LoayGhreeb Sep 22, 2024
9efee36
Indexing entries with Postgres
LoayGhreeb Sep 22, 2024
24e222a
Remove Lucene bib fields indexer
LoayGhreeb Sep 22, 2024
bc93bf1
Use PreparedStatement to fix escaping characters
LoayGhreeb Sep 22, 2024
fb64865
Rename LuceneManager to IndexManager
LoayGhreeb Sep 22, 2024
7839c68
Begin to implement "new" search syntax
koppor Sep 22, 2024
65fd4fe
Some new operators
koppor Sep 22, 2024
108947f
Change log level of EmbeddedPostgres
LoayGhreeb Sep 23, 2024
1e3482d
Handle search flags
LoayGhreeb Sep 23, 2024
d164248
Fix default field
LoayGhreeb Sep 23, 2024
593105c
Fix handling of anyfield (and add "any" as alias)
koppor Sep 23, 2024
2749b86
Openrewrite...
koppor Sep 23, 2024
58d7e25
More test cases
LoayGhreeb Sep 23, 2024
9028748
Remove non-covered libraries
koppor Sep 23, 2024
1787b5b
Merge branch 'postgresql' of github.com:JabRef/jabref into postgresql
koppor Sep 23, 2024
64bc03c
Use LIKE syntax as default instead of regex
LoayGhreeb Sep 23, 2024
519e390
Merge branch 'main' into postgresql
LoayGhreeb Sep 24, 2024
f61314c
Update module-info.java
LoayGhreeb Sep 24, 2024
250a1b0
Create "query" package
LoayGhreeb Sep 24, 2024
5314e66
Postgres searcher
LoayGhreeb Sep 24, 2024
fd2ace1
Return back the exact match operator
LoayGhreeb Sep 24, 2024
59ef889
Merge branch 'main' into postgresql
LoayGhreeb Sep 24, 2024
aa55eb9
checkstyle
LoayGhreeb Sep 24, 2024
239fde0
Add link
koppor Sep 24, 2024
fc6ad3c
Merge remote-tracking branch 'origin/main' into postgresql
koppor Sep 24, 2024
08b1dfb
WIP
koppor Sep 24, 2024
ab87dd5
Fix compilation
LoayGhreeb Sep 24, 2024
70d7eda
Merge branch 'main' into postgresql
LoayGhreeb Sep 26, 2024
e4eaef3
WIP
LoayGhreeb Sep 26, 2024
98bfffa
Intermediate result
koppor Sep 26, 2024
c5fcdaf
Query should be OK
koppor Sep 26, 2024
b473b6c
Indexing of split values
koppor Sep 26, 2024
ad8824d
Fix tests compile
LoayGhreeb Sep 26, 2024
97dc941
Use first name Last name for authors
LoayGhreeb Sep 26, 2024
ff79dd3
Refactor SQL query visitor
LoayGhreeb Sep 26, 2024
baa73cb
Adapt tests
LoayGhreeb Sep 26, 2024
9d0cf45
Merge branch 'main' into postgresql
LoayGhreeb Sep 27, 2024
066c743
Use join with EXACT_MATCH only
LoayGhreeb Sep 27, 2024
d9f93c4
Update to Postgres 17
LoayGhreeb Sep 28, 2024
38c0265
Attempt to use sub-queries with CTEs
LoayGhreeb Sep 28, 2024
e8a2836
Fix CTEs sub-queries and grouping
LoayGhreeb Sep 28, 2024
9073d0c
group matches by entry_id
LoayGhreeb Sep 28, 2024
51f1655
Merge branch 'main' into postgresql
LoayGhreeb Sep 29, 2024
3cbac93
Merge branch 'main' into postgresql
LoayGhreeb Sep 30, 2024
a34f8bd
Use NOT IN for negation queries
LoayGhreeb Sep 30, 2024
1fe2b06
Fix unary NOT operator
LoayGhreeb Sep 30, 2024
c6869cc
Use split values table for EXACT_MATCH queries
LoayGhreeb Sep 30, 2024
72b26e0
Prepare for linked files index (full-text)
LoayGhreeb Oct 2, 2024
a0cc539
Prepare linked files tables
LoayGhreeb Oct 2, 2024
27a0143
Fix searching
LoayGhreeb Oct 2, 2024
1c951fb
Use multi column index
LoayGhreeb Oct 2, 2024
981f158
fix merged module issues
Siedlerchr Oct 2, 2024
29c179e
Fix update event
LoayGhreeb Oct 4, 2024
e3d0628
Remove postgres linked files indexer
LoayGhreeb Oct 4, 2024
fb6f013
Remove and insert field on update event
LoayGhreeb Oct 4, 2024
65d7681
Remove search score column
LoayGhreeb Oct 4, 2024
f54bf6e
Update search groups matches
LoayGhreeb Oct 4, 2024
4b90aa5
Merge branch 'main' into postgresql
LoayGhreeb Oct 4, 2024
6ab8f55
Remove search_score from tale preferences
LoayGhreeb Oct 4, 2024
4fc088f
Migrate search groups flags to new syntax
LoayGhreeb Oct 4, 2024
1b1f0ff
Localization
LoayGhreeb Oct 4, 2024
855cf3c
Fix dialog message
LoayGhreeb Oct 4, 2024
c1dd99a
Merge branch 'main' into postgresql
LoayGhreeb Oct 4, 2024
9a35891
Ignores groups field from default searches
LoayGhreeb Oct 4, 2024
1ccfdb4
Use TYPE_HEADER field for entrytype
LoayGhreeb Oct 4, 2024
8450f89
Search to Lucene query for linked files searching
LoayGhreeb Oct 5, 2024
0b14663
Merge branch 'main' into postgresql
LoayGhreeb Oct 5, 2024
c127aaf
Marge linked files and bib fields results
LoayGhreeb Oct 5, 2024
b2c5428
Searching in background task
LoayGhreeb Oct 5, 2024
a3b8328
Fix search to SQL tests
LoayGhreeb Oct 6, 2024
0468812
Merge branch 'main' into postgresql
LoayGhreeb Oct 6, 2024
b7f6bf3
Localization test
LoayGhreeb Oct 6, 2024
2c50df8
Fix DatabaseSearcherTest
LoayGhreeb Oct 6, 2024
77bf811
Fix DatabaseSearcherWithBibFilesTest
LoayGhreeb Oct 6, 2024
b9975fc
Fix exportMatches test
LoayGhreeb Oct 6, 2024
9f02d04
Update src/main/java/org/jabref/model/entry/BibEntry.java
LoayGhreeb Oct 6, 2024
2751844
Add SINGLE_ENTRY_LINK to latex field
LoayGhreeb Oct 6, 2024
c5bde17
Remove changelog entries
LoayGhreeb Oct 6, 2024
b291b6c
Remove groups migration from localization
LoayGhreeb Oct 6, 2024
9e87053
Merge branch 'main' into postgresql
LoayGhreeb Oct 7, 2024
3bd961f
Merge branch 'main' into postgresql
LoayGhreeb Oct 9, 2024
c0a2593
Extract search terms from query (ignore negated terms)
LoayGhreeb Oct 9, 2024
bf5de09
Fix architecture test
LoayGhreeb Oct 9, 2024
46bb0d3
Highlight Preview viewer with Postgres regexp_replace
LoayGhreeb Oct 9, 2024
d451c2b
OpenRewrite
LoayGhreeb Oct 9, 2024
887d5e3
Remove onRunning
LoayGhreeb Oct 9, 2024
d26c8b9
Set search query listener in the constructor
LoayGhreeb Oct 9, 2024
eafdf30
Fix preview tab scrolling
LoayGhreeb Oct 9, 2024
d174508
Use prepared statement to fix escaping
LoayGhreeb Oct 9, 2024
ef959bc
Use prepared statement for sql query
LoayGhreeb Oct 10, 2024
e981bdc
Merge branch 'main' into postgresql
LoayGhreeb Oct 11, 2024
74f98ef
Store the start and end positions for every field
LoayGhreeb Oct 11, 2024
a7ca4d3
WIP highlight source tab
LoayGhreeb Oct 11, 2024
d4c0123
Merge branch 'main' into postgresql
LoayGhreeb Oct 11, 2024
5edd1a5
Fix source tab highlighting
LoayGhreeb Oct 11, 2024
ef27dc5
Return regex, case-sensitive flags back to the search bar
LoayGhreeb Oct 12, 2024
df2e12b
Use for search bar flags for unfielded terms
LoayGhreeb Oct 12, 2024
fb0fbb8
Skip migrations for unfieleded terms
LoayGhreeb Oct 12, 2024
fac963f
Return regex, case-sensitive CheckBox to search groups dialog
LoayGhreeb Oct 12, 2024
ef997e2
Merge branch 'main' into postgresql
LoayGhreeb Oct 12, 2024
6c4f1fa
Apply suggestions from code review
LoayGhreeb Oct 13, 2024
3b46b6d
Merge branch 'main' into postgresql
LoayGhreeb Oct 13, 2024
c7baf04
Update JabRef_en.properties
LoayGhreeb Oct 13, 2024
c32a866
Merge remote-tracking branch 'origin/main' into postgresql
koppor Oct 16, 2024
196c7ff
Merge branch 'main' into postgresql
LoayGhreeb Oct 19, 2024
a420070
Merge branch 'main' into postgresql
LoayGhreeb Oct 21, 2024
eb570fb
Fix search grammar to support special chars
LoayGhreeb Oct 21, 2024
eb23f05
Create SearchQueryTest.java
LoayGhreeb Oct 22, 2024
ae0154c
Adapt SQL visitor with new grammar
LoayGhreeb Oct 22, 2024
6cc6ebd
Allow to use quotes without escaping
LoayGhreeb Oct 22, 2024
50a919d
Merge branch 'main' into postgresql
LoayGhreeb Oct 22, 2024
b4bbe54
escape SQL wildcard chars
LoayGhreeb Oct 22, 2024
7c901f9
Reorder methods
LoayGhreeb Oct 22, 2024
58e0163
Adapt SearchFlagsToExpressionVisitor
LoayGhreeb Oct 22, 2024
070dcc6
Adapt SearchToLuceneVisitor
LoayGhreeb Oct 22, 2024
f4c694a
Adapt SearchQueryExtractorVisitor
LoayGhreeb Oct 22, 2024
e7008fd
Fix tests
LoayGhreeb Oct 22, 2024
19ca644
Fix DatabaseSearcherTest
LoayGhreeb Oct 22, 2024
e225cdc
Fix search terms patten for highlighting
LoayGhreeb Oct 22, 2024
77ddece
Highlight source tab field by field according to the search query
LoayGhreeb Oct 22, 2024
0b9eaf5
Apply suggestions from code review
LoayGhreeb Oct 22, 2024
b3d0053
Merge branch 'main' into postgresql
LoayGhreeb Oct 22, 2024
750a320
Update src/main/java/org/jabref/gui/importer/actions/SearchGroupsMigr…
LoayGhreeb Oct 23, 2024
dde1a26
Merge branch 'main' into postgresql
LoayGhreeb Oct 23, 2024
ddd5392
Set default operator to AND
LoayGhreeb Oct 23, 2024
3cfeb5d
remove debug
LoayGhreeb Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ dependencies {
// Even if "compileOnly" is used, IntelliJ always adds to module-info.java. To avoid issues during committing, we use "implementation" instead of "compileOnly"
implementation 'io.github.adr:e-adr:2.0.0-SNAPSHOT'

implementation 'io.zonky.test:embedded-postgres:2.0.7'
implementation enforcedPlatform('io.zonky.test.postgres:embedded-postgres-binaries-bom:16.4.0')

testImplementation 'io.github.classgraph:classgraph:4.8.175'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.3'
Expand Down
120 changes: 79 additions & 41 deletions external-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ URL: https://github.com/java-diff-utils/java-diff-utils
License: Apache-2.0
```

```yaml
Id: io.zonky.test:embedded-postgres
Project: embedded-postgres
URL: https://github.com/zonkyio/embedded-postgres
License: Apache-2.0
```

```yaml
Id: jakarta.annotation:jakarata.annotation-api
Project: Jakarta Annotations
Expand Down Expand Up @@ -699,8 +706,12 @@ License: BSD-3-Clause
3. (on WSL) `sed 's/[^a-z]*//' < build/reports/project/dependencies.txt | sed "s/\(.*\) .*/\1/" | grep -v "\->" | sort | uniq > build/dependencies-for-external-libraries.txt`

```text
ai.djl.huggingface:tokenizers:0.29.0
ai.djl.pytorch:pytorch-engine:0.30.0
ai.djl.pytorch:pytorch-model-zoo:0.30.0
ai.djl:api:0.30.0
at.favre.lib:hkdf:1.1.0
com.dlsc.gemsfx:gemsfx:2.32.0
com.dlsc.gemsfx:gemsfx:2.48.0
com.dlsc.pickerfx:pickerfx:1.3.1
com.dlsc.unitfx:unitfx:1.0.10
com.fasterxml.jackson.core:jackson-annotations:2.17.2
Expand All @@ -717,29 +728,37 @@ com.github.sialcasa.mvvmFX:mvvmfx-validation:f195849ca9
com.github.tomtung:latex2unicode_2.13:0.3.2
com.github.vatbub:mslinks:1.0.6.2
com.github.weisj:jsvg:1.2.0
com.google.code.gson:gson:2.10.1
com.google.errorprone:error_prone_annotations:2.26.1
com.google.code.gson:gson:2.11.0
com.google.errorprone:error_prone_annotations:2.27.0
com.google.guava:failureaccess:1.0.2
com.google.guava:guava:33.1.0-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.j2objc:j2objc-annotations:3.0.0
com.googlecode.javaewah:JavaEWAH:1.2.3
com.googlecode.plist:dd-plist:1.28
com.h2database:h2-mvstore:2.2.224
com.kohlschutter.junixsocket:junixsocket-common:2.9.1
com.kohlschutter.junixsocket:junixsocket-core:2.9.1
com.kohlschutter.junixsocket:junixsocket-mysql:2.9.1
com.kohlschutter.junixsocket:junixsocket-native-common:2.9.1
com.konghq:unirest-java-core:4.4.0
com.konghq:unirest-modules-gson:4.4.0
com.h2database:h2-mvstore:2.3.232
com.knuddels:jtokkit:1.1.0
com.kohlschutter.junixsocket:junixsocket-common:2.10.0
com.kohlschutter.junixsocket:junixsocket-core:2.10.0
com.kohlschutter.junixsocket:junixsocket-mysql:2.10.0
com.kohlschutter.junixsocket:junixsocket-native-common:2.10.0
com.konghq:unirest-java-core:4.4.4
com.konghq:unirest-modules-gson:4.4.4
com.oracle.ojdbc:ojdbc10:19.3.0.0
com.oracle.ojdbc:ons:19.3.0.0
com.oracle.ojdbc:osdt_cert:19.3.0.0
com.oracle.ojdbc:osdt_core:19.3.0.0
com.oracle.ojdbc:simplefan:19.3.0.0
com.oracle.ojdbc:ucp:19.3.0.0
com.squareup.okhttp3:logging-interceptor:4.12.0
com.squareup.okhttp3:okhttp-sse:4.12.0
com.squareup.okhttp3:okhttp:4.12.0
com.squareup.okio:okio-jvm:3.6.0
com.squareup.okio:okio:3.6.0
com.squareup.retrofit2:converter-gson:2.9.0
com.squareup.retrofit2:converter-jackson:2.9.0
com.squareup.retrofit2:retrofit:2.11.0
com.sun.istack:istack-commons-runtime:4.1.2
com.tobiasdiez:easybind:2.2.1-SNAPSHOT
com.vladsch.flexmark:flexmark-ext-emoji:0.64.8
com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.64.8
com.vladsch.flexmark:flexmark-ext-ins:0.64.8
Expand All @@ -762,12 +781,12 @@ com.vladsch.flexmark:flexmark-util-visitor:0.64.8
com.vladsch.flexmark:flexmark-util:0.64.8
com.vladsch.flexmark:flexmark:0.64.8
commons-beanutils:commons-beanutils:1.9.4
commons-cli:commons-cli:1.8.0
commons-codec:commons-codec:1.17.0
commons-cli:commons-cli:1.9.0
commons-codec:commons-codec:1.17.1
commons-collections:commons-collections:3.2.2
commons-digester:commons-digester:2.1
commons-io:commons-io:2.16.1
commons-logging:commons-logging:1.3.2
commons-logging:commons-logging:1.3.4
commons-validator:commons-validator:1.8.0
de.rototor.jeuclid:jeuclid-core:3.1.11
de.rototor.snuggletex:snuggletex-core:1.3.0
Expand All @@ -776,9 +795,20 @@ de.rototor.snuggletex:snuggletex:1.3.0
de.saxsys:mvvmfx:1.8.0
de.swiesend:secret-service:1.8.1-jdk17
de.undercouch:citeproc-java:3.1.0
dev.ai4j:openai4j:0.20.0
dev.langchain4j:langchain4j-core:0.34.0
dev.langchain4j:langchain4j-google-ai-gemini:0.34.0
dev.langchain4j:langchain4j-hugging-face:0.34.0
dev.langchain4j:langchain4j-mistral-ai:0.34.0
dev.langchain4j:langchain4j-open-ai:0.34.0
dev.langchain4j:langchain4j:0.34.0
eu.lestard:doc-annotations:0.2
info.debatty:java-string-similarity:2.0.0
io.github.adr:e-adr:2.0.0-SNAPSHOT
io.github.java-diff-utils:java-diff-utils:4.12
io.github.stefanbratanov:jvm-openai:0.11.0
io.github.thibaultmeyer:cuid:2.0.3
io.zonky.test:embedded-postgres:2.0.7
jakarta.activation:jakarta.activation-api:2.1.3
jakarta.annotation:jakarta.annotation-api:2.1.1
jakarta.inject:jakarta.inject-api:2.0.1
Expand All @@ -788,30 +818,32 @@ jakarta.xml.bind:jakarta.xml.bind-api:4.0.2
javax.measure:unit-api:2.2
net.harawata:appdirs:1.2.2
net.java.dev.jna:jna-platform:5.13.0
net.java.dev.jna:jna:5.13.0
net.java.dev.jna:jna:5.14.0
net.jcip:jcip-annotations:1.0
net.jodah:typetools:0.6.1
net.synedra:validatorfx:0.5.0
one.jpro.jproutils:tree-showing:0.2.2
org.antlr:antlr4-runtime:4.13.1
org.antlr:antlr4-runtime:4.13.2
org.apache.commons:commons-compress:1.27.1
org.apache.commons:commons-csv:1.11.0
org.apache.commons:commons-lang3:3.14.0
org.apache.commons:commons-lang3:3.17.0
org.apache.commons:commons-text:1.12.0
org.apache.httpcomponents.client5:httpclient5:5.3.1
org.apache.httpcomponents.core5:httpcore5-h2:5.2.4
org.apache.httpcomponents.core5:httpcore5:5.2.4
org.apache.logging.log4j:log4j-api:2.23.1
org.apache.logging.log4j:log4j-to-slf4j:2.23.1
org.apache.logging.log4j:log4j-api:2.24.0
org.apache.logging.log4j:log4j-to-slf4j:2.24.0
org.apache.lucene:lucene-analysis-common:9.11.1
org.apache.lucene:lucene-core:9.11.1
org.apache.lucene:lucene-highlighter:9.11.1
org.apache.lucene:lucene-queries:9.11.1
org.apache.lucene:lucene-queryparser:9.11.1
org.apache.lucene:lucene-sandbox:9.11.1
org.apache.pdfbox:fontbox:3.0.2
org.apache.pdfbox:pdfbox-io:3.0.2
org.apache.pdfbox:pdfbox:3.0.2
org.apache.pdfbox:xmpbox:3.0.2
org.apache.opennlp:opennlp-tools:1.9.4
org.apache.pdfbox:fontbox:3.0.3
org.apache.pdfbox:pdfbox-io:3.0.3
org.apache.pdfbox:pdfbox:3.0.3
org.apache.pdfbox:xmpbox:3.0.3
org.apiguardian:apiguardian-api:1.1.2
org.bouncycastle:bcprov-jdk18on:1.78.1
org.checkerframework:checker-qual:3.42.0
Expand All @@ -833,18 +865,23 @@ org.glassfish.hk2:osgi-resource-locator:1.0.3
org.glassfish.jaxb:jaxb-core:4.0.3
org.glassfish.jaxb:jaxb-runtime:4.0.3
org.glassfish.jaxb:txw2:4.0.3
org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.7
org.glassfish.jersey.core:jersey-client:3.1.7
org.glassfish.jersey.core:jersey-common:3.1.7
org.glassfish.jersey.core:jersey-server:3.1.7
org.glassfish.jersey.inject:jersey-hk2:3.1.7
org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.8
org.glassfish.jersey.core:jersey-client:3.1.8
org.glassfish.jersey.core:jersey-common:3.1.8
org.glassfish.jersey.core:jersey-server:3.1.8
org.glassfish.jersey.inject:jersey-hk2:3.1.8
org.jabref:afterburner.fx:2.0.0
org.jabref:easybind:2.2.1-SNAPSHOT
org.javassist:javassist:3.30.2-GA
org.jbibtex:jbibtex:1.0.20
org.jetbrains.kotlin:kotlin-stdlib-common:2.0.20
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.20
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.20
org.jetbrains.kotlin:kotlin-stdlib:2.0.20
org.jetbrains:annotations:24.0.1
org.jooq:jool:0.9.15
org.jsoup:jsoup:1.17.2
org.jspecify:jspecify:0.3.0
org.jsoup:jsoup:1.18.1
org.jspecify:jspecify:1.0.0
org.kordamp.ikonli:ikonli-bootstrapicons-pack:12.3.1
org.kordamp.ikonli:ikonli-core:12.3.1
org.kordamp.ikonli:ikonli-javafx:12.3.1
Expand All @@ -854,22 +891,23 @@ org.kordamp.ikonli:ikonli-materialdesign2-pack:12.3.1
org.libreoffice:libreoffice:24.2.3
org.libreoffice:unoloader:24.2.3
org.mariadb.jdbc:mariadb-java-client:2.7.9
org.openjfx:javafx-base:22.0.1
org.openjfx:javafx-controls:22.0.1
org.openjfx:javafx-fxml:22.0.1
org.openjfx:javafx-graphics:22.0.1
org.openjfx:javafx-media:22.0.1
org.openjfx:javafx-swing:22.0.1
org.openjfx:javafx-web:22.0.1
org.postgresql:postgresql:42.7.3
org.openjfx:javafx-base:23
org.openjfx:javafx-controls:23
org.openjfx:javafx-fxml:23
org.openjfx:javafx-graphics:23
org.openjfx:javafx-media:23
org.openjfx:javafx-swing:23
org.openjfx:javafx-web:23
org.postgresql:postgresql:42.7.4
org.reactfx:reactfx:2.0-M5
org.scala-lang:scala-library:2.13.8
org.slf4j:jul-to-slf4j:2.0.13
org.slf4j:slf4j-api:2.0.13
org.slf4j:jul-to-slf4j:2.0.16
org.slf4j:slf4j-api:2.0.16
org.tinylog:slf4j-tinylog:2.7.0
org.tinylog:tinylog-api:2.7.0
org.tinylog:tinylog-impl:2.7.0
org.yaml:snakeyaml:2.2
org.tukaani:xz:1.9
org.yaml:snakeyaml:2.3
pt.davidafsilva.apple:jkeychain:1.1.0
tech.units:indriya:2.2
tech.uom.lib:uom-lib-common:2.2
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
// endregion

// region: SQL databases
requires embedded.postgres;
requires org.tukaani.xz;
requires ojdbc10;
requires org.postgresql.jdbc;
requires org.mariadb.jdbc;
Expand All @@ -108,6 +110,8 @@
requires io.github.javadiffutils;
requires java.string.similarity;
requires org.apache.commons.cli;
requires org.apache.commons.codec;
requires org.apache.commons.compress;
requires org.apache.commons.csv;
requires org.apache.commons.io;
requires org.apache.commons.lang3;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.jabref.logic.protectedterms.ProtectedTermsLoader;
import org.jabref.logic.remote.RemotePreferences;
import org.jabref.logic.remote.client.RemoteClient;
import org.jabref.logic.search.PostgreServer;
import org.jabref.logic.util.BuildInfo;
import org.jabref.logic.util.Directories;
import org.jabref.logic.util.HeadlessExecutorService;
Expand Down Expand Up @@ -92,6 +93,9 @@ public static void main(String[] args) {
DirectoryMonitor directoryMonitor = new DefaultDirectoryMonitor();
Injector.setModelOrService(DirectoryMonitor.class, directoryMonitor);

PostgreServer postgreServer = new PostgreServer();
Injector.setModelOrService(PostgreServer.class, postgreServer);

// Process arguments
ArgumentProcessor argumentProcessor = new ArgumentProcessor(
args,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ private boolean exportMatches(List<ParserResult> loaded) {

List<BibEntry> matches;
try {
// extract current thread task executor from luceneManager
// extract current thread task executor from indexManager
matches = new DatabaseSearcher(query, databaseContext, new CurrentThreadTaskExecutor(), cliPreferences.getFilePreferences()).getMatches();
} catch (IOException e) {
LOGGER.error("Error occurred when searching", e);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/gui/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.jabref.logic.net.ProxyRegisterer;
import org.jabref.logic.remote.RemotePreferences;
import org.jabref.logic.remote.server.RemoteListenerServerManager;
import org.jabref.logic.search.PostgreServer;
import org.jabref.logic.util.BuildInfo;
import org.jabref.logic.util.FallbackExceptionHandler;
import org.jabref.logic.util.HeadlessExecutorService;
Expand Down Expand Up @@ -398,6 +399,9 @@ public static void shutdownThreadPools() {
LOGGER.trace("Shutting down directoryMonitor");
DirectoryMonitor directoryMonitor = Injector.instantiateModelOrService(DirectoryMonitor.class);
directoryMonitor.shutdown();
LOGGER.trace("Shutting down postgreServer");
PostgreServer postgreServer = Injector.instantiateModelOrService(PostgreServer.class);
postgreServer.shutdown();
LOGGER.trace("Shutting down HeadlessExecutorService");
HeadlessExecutorService.INSTANCE.shutdownEverything();
LOGGER.trace("Finished shutdownThreadPools");
Expand Down
35 changes: 17 additions & 18 deletions src/main/java/org/jabref/gui/LibraryTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.pdf.FileAnnotationCache;
import org.jabref.logic.search.LuceneManager;
import org.jabref.logic.search.IndexManager;
import org.jabref.logic.shared.DatabaseLocation;
import org.jabref.logic.util.BackgroundTask;
import org.jabref.logic.util.TaskExecutor;
Expand All @@ -92,7 +92,6 @@
import org.jabref.model.entry.event.FieldChangedEvent;
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.FieldFactory;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.groups.GroupTreeNode;
import org.jabref.model.search.SearchQuery;
import org.jabref.model.util.DirectoryMonitor;
Expand Down Expand Up @@ -167,7 +166,7 @@ private enum PanelMode { MAIN_TABLE, MAIN_TABLE_AND_ENTRY_EDITOR }
private final DirectoryMonitorManager directoryMonitorManager;

private ImportHandler importHandler;
private LuceneManager luceneManager;
private IndexManager indexManager;

/**
* @param isDummyContext Indicates whether the database context is a dummy. A dummy context is used to display a progress indicator while parsing the database.
Expand Down Expand Up @@ -210,7 +209,7 @@ private LibraryTab(BibDatabaseContext bibDatabaseContext,

private void initializeComponentsAndListeners(boolean isDummyContext) {
if (!isDummyContext) {
createLuceneManager();
createIndexManager();
}

if (tableModel != null) {
Expand All @@ -221,7 +220,7 @@ private void initializeComponentsAndListeners(boolean isDummyContext) {
bibDatabaseContext.getMetaData().registerListener(this);

this.selectedGroupsProperty = new SimpleListProperty<>(stateManager.getSelectedGroups(bibDatabaseContext));
this.tableModel = new MainTableDataModel(getBibDatabaseContext(), preferences, taskExecutor, stateManager, getLuceneManager(), selectedGroupsProperty(), searchQueryProperty(), resultSizeProperty());
this.tableModel = new MainTableDataModel(getBibDatabaseContext(), preferences, taskExecutor, getIndexManager(), selectedGroupsProperty(), searchQueryProperty(), resultSizeProperty());

new CitationStyleCache(bibDatabaseContext);
annotationCache = new FileAnnotationCache(bibDatabaseContext, preferences.getFilePreferences());
Expand Down Expand Up @@ -315,17 +314,17 @@ private void onDatabaseLoadingSucceed(ParserResult result) {
dataLoadingTask = null;
}

public void createLuceneManager() {
luceneManager = new LuceneManager(bibDatabaseContext, taskExecutor, preferences.getFilePreferences());
stateManager.setLuceneManager(bibDatabaseContext, luceneManager);
public void createIndexManager() {
indexManager = new IndexManager(bibDatabaseContext, taskExecutor, preferences.getFilePreferences());
stateManager.setIndexManager(bibDatabaseContext, indexManager);
}

public LuceneManager getLuceneManager() {
return luceneManager;
public IndexManager getIndexManager() {
return indexManager;
}

public void closeLuceneManger() {
luceneManager.close();
public void closeIndexManger() {
indexManager.close();
}

private void onDatabaseLoadingFailed(Exception ex) {
Expand Down Expand Up @@ -787,11 +786,11 @@ private void onClosed(Event event) {
LOGGER.error("Problem when closing directory monitor", e);
}
try {
if (luceneManager != null) {
luceneManager.close();
if (indexManager != null) {
indexManager.close();
}
} catch (RuntimeException e) {
LOGGER.error("Problem when closing lucene indexer", e);
LOGGER.error("Problem when closing index manager", e);
}
try {
AutosaveManager.shutdown(bibDatabaseContext);
Expand Down Expand Up @@ -1140,17 +1139,17 @@ private class IndexUpdateListener {

@Subscribe
public void listen(EntriesAddedEvent addedEntryEvent) {
luceneManager.addToIndex(addedEntryEvent.getBibEntries());
indexManager.addToIndex(addedEntryEvent.getBibEntries());
}

@Subscribe
public void listen(EntriesRemovedEvent removedEntriesEvent) {
luceneManager.removeFromIndex(removedEntriesEvent.getBibEntries());
indexManager.removeFromIndex(removedEntriesEvent.getBibEntries());
}

@Subscribe
public void listen(FieldChangedEvent fieldChangedEvent) {
luceneManager.updateEntry(fieldChangedEvent.getBibEntry(), fieldChangedEvent.getOldValue(), fieldChangedEvent.getNewValue(), fieldChangedEvent.getField().equals(StandardField.FILE));
indexManager.updateEntry(fieldChangedEvent);
}
}

Expand Down
Loading