Skip to content

Commit

Permalink
Merge pull request #316 from charvolant/issue-311
Browse files Browse the repository at this point in the history
Remove ?p= type URLs no matter where they hide
  • Loading branch information
charvolant authored Mar 11, 2021
2 parents defa3de + ca4e01d commit 053b813
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions grails-app/services/au/org/ala/bie/ImportService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -543,18 +543,9 @@ class ImportService implements GrailsConfigurationAware {
log.debug documentCount + ". Indexing WP page - id: " + document.id + " | title: " + document.title + " | text: " + StringUtils.substring(document.body, 0, 100) + "... ";
def doc = [:]
doc["idxtype"] = IndexDocType.WORDPRESS.name()

if (StringUtils.isNotBlank(document.shortlink)) {
doc["guid"] = document.shortlink
} else if (StringUtils.isNotEmpty(document.id)) {
doc["guid"] = Encoder.buildServiceUrl(wordPressBaseUrl, wordPressPageFormat, document.id).toExternalForm()
} else {
// fallback
doc["guid"] = pageUrl
}

doc["id"] = "wp" + document.id // probably not needed but safer to leave in
doc["name"] = document.title // , 1.2f
doc["guid"] = pageUrl
doc["name"] = document.title
doc["content"] = document.body
doc["linkIdentifier"] = pageUrl
//doc["australian_s"] = "recorded" // so they appear in default QF search
Expand Down

0 comments on commit 053b813

Please sign in to comment.